docker pull nginx

docker run -d --name nginx-official -p 8080:80 nginx

Open:
http://localhost:8080

docker images nginx

(Folder: Part1)
FROM ubuntu:22.04
RUN apt-get update && \
apt-get install -y nginx && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
---
docker build -t nginx-ubuntu .

docker images nginx-ubuntu

(Folder: Part2)
FROM alpine:latest
RUN apk add --no-cache nginx
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

docker build -t nginx-alpine .

docker run -d --name nginx-alpine -p 8082:80 nginx-alpine

docker images | findstr nginx

mkdir html

echo "<h1>Hello from Docker NGINX</h1>" > html/index.html

docker run -d ^
-p 8083:80 ^
-v ${PWD}\html:/usr/share/nginx/html ^
nginx

Open:
http://localhost:8083
