A containerized static website deployment demonstrating core Docker fundamentals on a cloud-hosted Linux environment: provisioning a virtual machine, installing a container runtime, and serving content through a production-grade web server all without a single line of application code touching the host directly.
Browser (Public IP:8080)
│
▼
┌─────────────────────────────┐
│ AWS EC2 (Ubuntu) │
│ │
│ ┌────────────────────┐ │
│ │ Docker Engine │ │
│ │ │ │
│ │ ┌────────────────┐ │ │
│ │ │ nginx container │ │ │
│ │ │ :80 ───────► │◄┼────┼── port 8080
│ │ └────────────────┘ │ │
│ │ ▲ │ │
│ └─────────┼────────────┘ │
│ │ bind mount │
│ ~/website/index.html │
└─────────────────────────────┘
This project deploys a static HTML website inside an Nginx container running on an AWS EC2 (Ubuntu) instance. The site is served on port 8080 and reachable from any browser via the instance's public IP, with the site's source files bind-mounted from the host so updates are reflected instantly without rebuilding the image.
| Component | Role |
|---|---|
| AWS EC2 (Ubuntu) | Host virtual machine |
| Docker CE | Container runtime |
| Nginx (official image) | Web server serving static content |
| Bind mount | Live-syncs host files into the container |
1. Provision & prepare the host
Launched an Ubuntu EC2 instance and installed Docker CE via Docker's official APT repository (GPG key verification, repository registration, docker-ce + plugins), then validated the install with docker run hello-world.
2. Build the site directory
Created a host-side website/ directory containing index.html a styled static landing page (AWS user group event listing) written directly on the instance.
3. Containerize with Nginx
Ran an official nginx image with the host directory bind-mounted to Nginx's default content path, publishing container port 80 to host port 8080:
docker run -it -d --name web -p 8080:80 -v ~/website:/usr/share/nginx/html nginx4. Verify
Accessed the site from a browser using the EC2 instance's public IP on port 8080, confirming Nginx served the mounted content correctly and that edits to index.html on the host are reflected live, with no rebuild needed.
- Installing and configuring Docker on a cloud Linux host from scratch
- Running and managing containers (
docker run, naming, detached mode) - Port mapping between host and container
- Bind mounts for live file syncing during development
- Exposing a containerized service via a public cloud IP
- Terminal recordings and command screenshots for each step are included in
/screenshots(add folder once uploaded). - Architecture diagram will be finalized using official AWS and Docker icon sets.
Part of a broader DevOps learning portfolio documenting hands-on cloud and containerization projects.




