Go to file
2025-03-19 17:03:51 +01:00
docker-compose.yml Initial commit for Docker project 2025-03-19 17:03:51 +01:00
dockerfile Initial commit for Docker project 2025-03-19 17:03:51 +01:00
prepare-app.sh Initial commit for Docker project 2025-03-19 17:03:51 +01:00
README.md Initial commit for Docker project 2025-03-19 17:03:51 +01:00
remove-app.sh Initial commit for Docker project 2025-03-19 17:03:51 +01:00
start-app.sh Initial commit for Docker project 2025-03-19 17:03:51 +01:00
stop-app.sh Initial commit for Docker project 2025-03-19 17:03:51 +01:00
testapp.py Initial commit for Docker project 2025-03-19 17:03:51 +01:00

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

  1. Preparation Run the following command to set up the environment:

    ./prepare-app.sh
    
  2. Start the Application Start the application with:

    ./start-app.sh
    

    The app will be available at: http://localhost:5000

  3. Stop the Application To stop the application:

    ./stop-app.sh
    
  4. Remove the Application To remove all Docker containers, networks, and volumes:

    ./remove-app.sh
    

Working Example

  1. Prepare the application:

    ./prepare-app.sh
    
  2. Start the app:

    ./start-app.sh
    
  3. Visit http://localhost:5000 in a browser.

  4. Stop the app:

    ./stop-app.sh
    
  5. Remove the app:

    ./remove-app.sh
    

Conclusion

This application demonstrates Docker containerization of a Flask app with basic form handling.