Docker: Difference between revisions
m
→NGINX: m
(→RancherOS: ssh) |
m (→NGINX: m) |
||
Line 88:
Run nginx docker image with auto Restart on reboot option
docker run --name nginx -p 80:80 -d -v ~/docker
Docker currently has four restart policies[https://blog.codeship.com/ensuring-containers-are-always-running-with-dockers-restart-policy/]:
Line 98:
;Multiple Instances
Create copies of root directory for different servers:
cp -r ~/docker
cp -r ~/docker
cp -r ~/docker
cp -r ~/docker
Edit the Index.html file to reflect different content by editing the html code.
Start different instances of nginx to start with different ports & root directories:
docker run --name
docker run --name
docker run --name
docker run --name
Nginx instances should now be available using below links:
http://<IP_of_Server>:8080▼
http://<IP_of_Server>:8081
http://<IP_of_Server>:8082
http://<IP_of_Server>:8083
= RancherOS =
|