This is a Flask web application designed to show the process of containerization using Docker.
593
š Project Overview
This is a minimalistic Flask web application designed to demonstrate the process of containerization using Docker. The application uses an in-memory counter, which is ideal for quick setup and testing of the Docker build and run lifecycle. Source Code: https://github.com/winterlyembrace/megaclickerā Important Note: The counter is stored in the container's temporary memory and will reset if the container is stopped or restarted.
āļø Prerequisites
To build and run the application, you will need the following installed: Git, Docker Engine (version 18.06+) installed and running.
š ļø Execution Instructions
Follow these steps in your terminal.
Step 1: Clone the Repository Retrieve the source code from GitHub:
git clone https://github.com/winterlyembrace/megaclickerā cd megaclicker
Step 2: Build the Docker Image
The docker build command compiles the image using the Dockerfile in the current directory. I tag it using the standard convention ([USERNAME]/[REPO]) for potential later push to Docker Hub.
docker build -t winterlyembrace/megaclicker:latest .
winterlyembrace/megaclicker:latest is the name assigned to the image.
Step 3: Run the Container
Start the container in detached mode (-d), mapping port 5000 to your local port 5000:
docker run -d -p 5000:5000 --name megaclicker winterlyembrace/megaclicker:latest
-p 5000:5000: Port Mapping. This connects the application port inside the container to the port on your host machine.
Step 4: Access the Application
Open your web browser and navigate to the following address:
You should see the running application and the clickable button.
š Stopping and Cleanup To stop and remove the test container when finished:
Stop the running container docker stop megaclicker
Remove the container (optional) docker rm megaclicker
Content type
Image
Digest
sha256:93f366ea5ā¦
Size
47.3 MB
Last updated
9 months ago
docker pull winterlyembrace/megaclicker