This repository demonstrates a CI/CD pipeline using GitHub Actions to build a minimal Docker image with a Flask application using multi-stage builds. The pipeline automates the building, pushing of the Docker image to GitHub Container Registry (or AWS ECR), and deployment to AWS ECS.
app.py
: The Flask application.Dockerfile
: The multi-stage Dockerfile..github/workflows/ci-cd.yml
: The GitHub Actions workflow file.
- Docker
- AWS Account (if deploying to AWS ECS)
- Clone the repository:
git clone https://github.com/DavIoTech404/flask-docker-multistage-ci
- Build the Docker image:
docker build -t flask-docker-multistage .
- Run the Docker container:
docker run -p 5000:5000 flask-docker-multistage