Building Nginx Docker image

Building Nginx Docker image 1

1.create a directory

mkdir abcd
cd abcd

2.creating a docker file

nano dockerfile

copy below code

FROM nginx:1.11-alpine
COPY index.html /usr/share/nginx/html/index.html
EXPOSE 80

3.launch the image

docker run -d -p 80:80 <image-id|friendly-tag-name>

4. check your ip

curl -i http://yourip.com

5.access your website through browser

http://yourip.com
Default image
Vishal Devxo
Vishal Devxo is a DevOps engineer and a Backend developer, he spends all his time for creating good tutorials with better visuals and blogging, developed some projects based on Python-Django, some hacking modules and scripts in python