This project containerizes a simple static website using the official Nginx Docker image.
index.html— the page served by NginxDockerfile— builds an image that copiesindex.htmlinto Nginx
- Docker Desktop (Windows/Mac) or Docker Engine (Linux)
From this folder:
docker build -t my-web-server .Maps your computer’s port 8080 to the container’s port 80:
docker run -d -p 8080:80 --name codealpha-container my-web-serverOpen:
# Check running containers
docker ps
# Stop the server
docker stop codealpha-container
# Start it again
docker start codealpha-container
# View logs (troubleshooting)
docker logs codealpha-container# Stop + remove container
docker rm -f codealpha-container
# Remove image (optional)
docker rmi my-web-server- If port
8080is already in use, pick another host port, e.g.-p 8081:80. - If you changed
index.html, rebuild the image (docker build ...) and rerun the container.
- Push this folder to a GitHub repo named
CodeAlpha_Web_Server_Docker. - Record a short video: show the files, run the
docker runcommand, and open/refreshhttp://localhost:8080. - Post on LinkedIn tagging @CodeAlpha with your GitHub repo link.
- Submit the links via the internship submission form.