Skip to content

Instantly share code, notes, and snippets.

@aperkaz
Last active February 23, 2018 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aperkaz/ca0ddf2bd933a98634ec800dc7fd2046 to your computer and use it in GitHub Desktop.
Save aperkaz/ca0ddf2bd933a98634ec800dc7fd2046 to your computer and use it in GitHub Desktop.
Docker Development

Docker Development

Short gist with Node development using Docker.

Effimeral container (with bash)

Span a Node docker container and connect into it.

Features

  • Mount bolume that will be removed on leave: -it --rm

  • Map and the the current directory as the container working directory: -v $(pwd):/src -w /src

  • Based on a image REF: node:6

  • Bash into the container: bash

Full command

docker run -it --rm -v $(pwd):/src -w /src -p 8080:8080 node:6 bash

Note: multiple ports can be forwarded by -p 80:80 -p 1500:1500 and so on.

Perennial container

Follow the process from https://github.com/aperkaz/frontend-node-docker. Optimized for Node.

Node in production

// in progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment