{"id":20148195,"url":"https://github.com/chainguard-dev/cg-images-python-migration","last_synced_at":"2025-03-03T00:25:46.317Z","repository":{"id":237506772,"uuid":"794583923","full_name":"chainguard-dev/cg-images-python-migration","owner":"chainguard-dev","description":"Sample Flask application migrated to Chainguard Images","archived":false,"fork":false,"pushed_at":"2024-11-19T15:13:27.000Z","size":33,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-13T11:23:19.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chainguard-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-01T14:18:11.000Z","updated_at":"2024-12-06T20:45:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"3aa45368-82ce-4201-8a87-d039a5fa4672","html_url":"https://github.com/chainguard-dev/cg-images-python-migration","commit_stats":null,"previous_names":["chainguard-dev/cg-images-python-migration"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fcg-images-python-migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fcg-images-python-migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fcg-images-python-migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fcg-images-python-migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainguard-dev","download_url":"https://codeload.github.com/chainguard-dev/cg-images-python-migration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587798,"owners_count":19986628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T22:35:08.202Z","updated_at":"2025-03-03T00:25:46.291Z","avatar_url":"https://github.com/chainguard-dev.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Migrating a Flask Application to Chainguard Images\n\nSample 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.\n\nTo clone and fetch/pull all branches:\n\n```bash\ngit clone git@github.com:chainguard-dev/cg-images-python-migration.git\ncd cg-images-python-migration\ngit branch -r | grep -v '\\-\u003e' | sed \"s,\\x1B\\[[0-9;]*[a-zA-Z],,g\" | while read remote; do git branch --track \"${remote#origin/}\" \"$remote\"; done\ngit fetch --all\ngit pull --all\n```\n\nThe below branches show different stages of project development:\n\n- [Pre-migration Flask app](https://github.com/chainguard-dev/cg-images-python-migration/tree/v0)\n- [Flask application and Dockerfile only](https://github.com/chainguard-dev/cg-images-python-migration/tree/python-only)\n- [Docker Compose with Flask application and nginx](https://github.com/chainguard-dev/cg-images-python-migration/tree/compose-flask-nginx)\n\n## Resources\n\n- [Migrating to Python Chainguard Images](https://edu.chainguard.dev/chainguard/migration/migrating-python/)\n- [Blog Post: Securely Containerize a Python Application with Chainguard Images](https://dev.to/chainguard/securely-containerize-a-python-application-with-chainguard-images-bn8)\n- [Video: How to containerize a Python application with a multi-stage build using Chainguard Images](https://www.youtube.com/watch?v=2D0JULd4E5A)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fcg-images-python-migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainguard-dev%2Fcg-images-python-migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fcg-images-python-migration/lists"}