##vi index.html
Hello Students! from DevOps4Beginners.
vi Dockerfile
FROM ubuntu
LABEL description = "My image for nginx Web Server"
LABEL version = "V1.0"
RUN apt-get update -y && \
apt-get install curl -y && \
apt-get install nginx -y
WORKDIR /var/www/html
COPY index.html ./
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
docker image build -t mywebserver4:v1 .
docker container exec -it mynginx /bin/bash
docker container run -d --name myCustomNginx4 -P mywebserver4:v1
curl localhost:[port]
Watch video 17. Dockerfile Part 4 COPY ADD WORKDIR online without registration, duration hours minute second in high quality. This video was added by user iMustLearn 14 July 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 90 once and liked it 2 people.