Skip to content

Instantly share code, notes, and snippets.

@milianoo
Last active June 20, 2017 14:22
Show Gist options
  • Save milianoo/3a223ec95ad97129b4e4290b46dd701a to your computer and use it in GitHub Desktop.
Save milianoo/3a223ec95ad97129b4e4290b46dd701a to your computer and use it in GitHub Desktop.
Deploy Nginx using Docker Containers
1. get latest image of nginx
sudo docker pull nginx
2. run nginx image
sudo docker run --name some-nginx -d -p 80:80 nginx
Note : added the -d flag to run the container in the background (detached mode).
3.1 If you are using Azure, make sure to allow http inbound traffic on port 80.
Network Secutiry Group > Inbound Security rules > allow port 80
3. access nginx on localhost or ip
That's it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment