Last active
December 19, 2015 00:09
-
-
Save siygle/5866545 to your computer and use it in GitHub Desktop.
Example of setup nodejs env on docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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