https://github.com/chainguard-dev/cg-images-python-migration
Sample Flask application migrated to Chainguard Images
https://github.com/chainguard-dev/cg-images-python-migration
Last synced: 3 months ago
JSON representation
Sample Flask application migrated to Chainguard Images
- Host: GitHub
- URL: https://github.com/chainguard-dev/cg-images-python-migration
- Owner: chainguard-dev
- Created: 2024-05-01T14:18:11.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-19T15:13:27.000Z (6 months ago)
- Last Synced: 2025-01-13T11:23:19.306Z (4 months ago)
- Language: Dockerfile
- Size: 32.2 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Migrating a Flask Application to Chainguard Images
Sample application showing a migration to Chainguard Images for a Flask application. We start with a simple containerized Flask application based on a default Python image, migrate it to Chainguard Images, then add a Docker Compose file orchestrating the application with a reverse proxy using Chainguard's nginx image.
To clone and fetch/pull all branches:
```bash
git clone [email protected]:chainguard-dev/cg-images-python-migration.git
cd cg-images-python-migration
git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
```The below branches show different stages of project development:
- [Pre-migration Flask app](https://github.com/chainguard-dev/cg-images-python-migration/tree/v0)
- [Flask application and Dockerfile only](https://github.com/chainguard-dev/cg-images-python-migration/tree/python-only)
- [Docker Compose with Flask application and nginx](https://github.com/chainguard-dev/cg-images-python-migration/tree/compose-flask-nginx)## Resources
- [Migrating to Python Chainguard Images](https://edu.chainguard.dev/chainguard/migration/migrating-python/)
- [Blog Post: Securely Containerize a Python Application with Chainguard Images](https://dev.to/chainguard/securely-containerize-a-python-application-with-chainguard-images-bn8)
- [Video: How to containerize a Python application with a multi-stage build using Chainguard Images](https://www.youtube.com/watch?v=2D0JULd4E5A)