This project demonstrates the containerization of a static web application—a Christmas-themed counter—using Docker on an Arch Linux distribution. The primary objective was to transition from a local development environment to a standardized, portable containerized production environment, following the BUILD and RUN methodology discussed with industry professionals.
- Operating System: Arch Linux
- Container Engine: Docker
- Base Image: nginx:alpine (utilized for its minimal footprint and security hardening)
The source code was retrieved from the remote GitHub repository using the Git CLI:
git clone https://github.com/RengokuChan/Maellan-s-pre-christmas-gift.git
A Dockerfile was authored to define the build instructions for the container image:
- Base Layer: Specification of the Nginx Alpine image.
- Asset Management: Transfer of local web assets (HTML, CSS, JS) to the default Nginx server directory:
/usr/share/nginx/html - Network Configuration: Exposure of port 80 to allow external traffic.
The image was generated using the Docker build command:
docker build -t site-mignon:v1 .
|| Note: During the initial build phase, a naming convention error (case sensitivity) was resolved by renaming the configuration file from DockerFile to the standard Dockerfile ||
||
||
The container was instantiated in a detached state with port forwarding configured to map host port 8080 to container port 80:
docker run -d -p 8080:80 --name mon-site site-mignon:v1
Validation was confirmed by accessing the application via the local loopback address at http://localhost:8080. The successful rendering of the application confirms the integrity of the build and run cycles, ensuring that the environment is production-ready.