Building Nginx Docker image

Building Nginx Docker image

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
Last updated on by vishal devxo