Skip to content

About

Static website served by Nginx in Docker (CodeAlpha Task 4)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeAlpha Web Server using Docker (Nginx)

This project containerizes a simple static website using the official Nginx Docker image.

Files

  • index.html — the page served by Nginx
  • Dockerfile — builds an image that copies index.html into Nginx

Prerequisites

  • Docker Desktop (Windows/Mac) or Docker Engine (Linux)

Build

From this folder:

docker build -t my-web-server .

Run

Maps your computer’s port 8080 to the container’s port 80:

docker run -d -p 8080:80 --name codealpha-container my-web-server

Open:

Container lifecycle commands

# 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

Cleanup

# Stop + remove container
docker rm -f codealpha-container

# Remove image (optional)
docker rmi my-web-server

Notes / Troubleshooting

  • If port 8080 is 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.

Submission checklist

  • Push this folder to a GitHub repo named CodeAlpha_Web_Server_Docker.
  • Record a short video: show the files, run the docker run command, and open/refresh http://localhost:8080.
  • Post on LinkedIn tagging @CodeAlpha with your GitHub repo link.
  • Submit the links via the internship submission form.

About

Static website served by Nginx in Docker (CodeAlpha Task 4)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages