Last active
November 22, 2016 21:28
-
-
Save ruichuang/0e006b431bf4a66bba3b40c08d646164 to your computer and use it in GitHub Desktop.
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
| Vagrant | |
| 1. ioslate box. | |
| 2. run provisioning script(production env.) aganist box. | |
| 3. everyone using same provisioning script got same env. | |
| Docker | |
| 1. docker file -- build --> docker image. | |
| 2. docker image contains all project code, env. and all installment needed to make project run --> docker container. | |
| 3. container run on top of VMs, any server with any Host OS as long as has Docker Engine installed. | |
| 4. deployi into cluster, running many containers let Nginx do load balancing. | |
| Docker Commands: | |
| - docker run <image> = take image create container from image and start container | |
| - docker start <name| id> = start existing container | |
| - docker stop <name| id> | |
| - docker ps = list all running containers [-a include all stopped containers] | |
| - docker rm <name | id> | |
| create docker vm, ssh into and docker login | |
| docker run -d(run @ background) --name(give web a name) -p 8080:80 (map port 80 to 8080) | |
| use boot2docker - a vm run docker on Mac/Win | |
| -boot2docker up | |
| -$(boot2docker shellinit)[need run every new terminal window] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment