Skip to content

Instantly share code, notes, and snippets.

@siygle
Last active December 19, 2015 00:09
Show Gist options
  • Select an option

  • Save siygle/5866545 to your computer and use it in GitHub Desktop.

Select an option

Save siygle/5866545 to your computer and use it in GitHub Desktop.
Example of setup nodejs env on docker
# install dependency first
# http://www.docker.io/gettingstarted/
sudo apt-get install linux-image-extra-`uname -r`
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:dotcloud/lxc-docker
sudo apt-get update
sudo apt-get install lxc-docker
# Build your nodejs application
# docker had an example on centOS, I'll build one on ubuntu
# Could clone the sample or follow the same format and do it yourself.
git clone https://github.com/Ferrari/docker-nodejs-seed.git
cd docker-nodejs-seed
# Build your image
# Your can push to repository too.
# docker login; docker build -t <username>/<image name>
docker build -t <your image name> .
# Run your image
docker run -d <your image name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment