| docker-compose.yml | ||
| dockerfile | ||
| prepare-app.sh | ||
| README.md | ||
| remove-app.sh | ||
| start-app.sh | ||
| stop-app.sh | ||
| testapp.py | ||
Docker Web Application
Prerequisites
- Docker installed on the system.
Application Description
This is a simple Flask web application running inside a Docker container. The app accepts user input via a form and displays the submitted data.
Docker Setup
-
Preparation Run the following command to set up the environment:
./prepare-app.sh -
Start the Application Start the application with:
./start-app.shThe app will be available at: http://localhost:5000
-
Stop the Application To stop the application:
./stop-app.sh -
Remove the Application To remove all Docker containers, networks, and volumes:
./remove-app.sh
Working Example
-
Prepare the application:
./prepare-app.sh -
Start the app:
./start-app.sh -
Visit http://localhost:5000 in a browser.
-
Stop the app:
./stop-app.sh -
Remove the app:
./remove-app.sh
Conclusion
This application demonstrates Docker containerization of a Flask app with basic form handling.