Sign inSign up

winterlyembrace/megaclicker

By winterlyembrace

•Updated 9 months ago

This is a Flask web application designed to show the process of containerization using Docker.

Image
0

593

winterlyembrace/megaclicker repository overview

šŸš€ 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:

http://localhost:5000⁠

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

Tag summary

Content type

Image

Digest

sha256:93f366ea5…

Size

47.3 MB

Last updated

9 months ago

docker pull winterlyembrace/megaclicker