This is a simple Flask web application Dockerized for easy deployment. It provides a starting point for developing and deploying Flask applications using Docker containers.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Python 3.x
- Docker
mkdir Flask-Docker-App
cd Flask-Docker-App
python3 -m venv venv
source venv/bin/activate
pip install Flask
touch app.py Dockerfile
python app.py
This will start the Flask development server. Access the app in your web browser at http://public ip:5000
docker build -t flask-docker-app .
docker run -d -p 5000:5000 flask-docker-app
This will run the Flask app within a Docker container.
3. Access the app in your web browser at http://public ip:5000
docker tag <image_name>:latest <username>/<image_name>:latest
docker push <username>/<image_name>:latest