{"id":21392800,"url":"https://github.com/pvital/docker_flask","last_synced_at":"2026-05-15T12:36:09.261Z","repository":{"id":82962161,"uuid":"265264450","full_name":"pvital/docker_flask","owner":"pvital","description":"Docker setup to start a Flask project.","archived":false,"fork":false,"pushed_at":"2023-04-06T11:36:09.000Z","size":11,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-09T16:52:57.902Z","etag":null,"topics":["docker","dockerfile","flask","flask-api","flask-application","flask-restful","flask-server"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/pvital/docker_flask","language":"Roff","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pvital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-05-19T14:07:08.000Z","updated_at":"2023-04-06T11:55:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"641b1f01-7f6e-4874-98b6-5c719561a3b5","html_url":"https://github.com/pvital/docker_flask","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pvital/docker_flask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvital%2Fdocker_flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvital%2Fdocker_flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvital%2Fdocker_flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvital%2Fdocker_flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvital","download_url":"https://codeload.github.com/pvital/docker_flask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvital%2Fdocker_flask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","dockerfile","flask","flask-api","flask-application","flask-restful","flask-server"],"created_at":"2024-11-22T13:44:36.369Z","updated_at":"2026-05-15T12:36:09.227Z","avatar_url":"https://github.com/pvital.png","language":"Roff","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker_flask\nDocker setup to start a Flask project.\n\n## Supported tags and respective `Dockerfile` links\n\n(See [\"What's the difference between 'Shared' and 'Simple' tags?\" in the FAQ](https://github.com/docker-library/faq#whats-the-difference-between-shared-and-simple-tags).)\n\nAll images use the Debian Slim images from \n[Python](https://hub.docker.com/_/python) project as the source.\n\n## Simple tags\n\n-\t[`latest`, `python-3.11.2`](./Dockerfile)\n-\t[`latest-app`, `python-3.11.2-app`](./Dockerfile.app)\n-\t[`gunicorn`](./Dockerfile.gunicorn)\n-\t[`python-3.9.2`](./Dockerfile.python-3.9.2)\n-\t[`python-3.9.2-app`](./Dockerfile.app-3.9.2)\n- `dev`\n\n## How to use this image\n\n### Create a `Dockerfile` in your Python app project\n\n```dockerfile\nFROM pvital/docker_flask:latest\n\nWORKDIR /usr/src/app\n\nCOPY . .\n\nEXPOSE 5000\nENTRYPOINT [\"python\"]\nCMD [\"-m\", \"flask\", \"run\", \"--host=0.0.0.0\"]\n```\n\nYou can then build and run the Docker image:\n\n```console\n$ docker build -t \u003cimg_name\u003e:[tag] .\n$ docker run -it --rm -p 8080:5000 --name \u003capp_name\u003e \u003cimg_name\u003e:[tag]\n```\n\nwhere:\n\n* `\u003cimg_name\u003e` is the name of the Docker image for your project.\n* `[tag]` is an optional alias for this image. The default is `latest`.\n* `\u003capp_name\u003e` specifies a name with which you can refer to your container in \nsubsequent commands.\n\n\n### Run a simple Flask project\n\nFor many simple, single Flask projects, you may find it inconvenient to write a\ncomplete `Dockerfile`. In such cases, you can run a Flask application by using\nthe `docker_flask` image directly:\n\n```console\n$ docker run -it --rm \\\n  -p 8080:5000 \\\n  --mount type=bind,source=\"$PROJ_DIR\",target=/app \\\n  --name \u003capp_name\u003e \\\n  pvital/docker_flask:latest\n```\n\nwhere:\n\n* `$PROJ_DIR` is the path to the project directory. \n* `\u003capp_name\u003e` specifies a name with which you can refer to your container in \nsubsequent commands.\n\nNow the Flask service is responding on port 8080 of your local host. Point\nyour browser to http://127.0.0.1:8080/ and enjoy the magic. If you want the \napplication to listen to a different port, substitute the number 8080 from the\ncommand above with the desired one.\n\nIf you want to run the Flask application in a daemonized mode, execute the\ncommand with the `-d` argument:\n\n```console\n$ docker run -d --rm \\\n  -p 8080:5000 \\\n  --mount type=bind,source=\"$PROJ_DIR\",target=/app \\\n  --name \u003capp_name\u003e \\\n  pvital/docker_flask:latest\n ```\n\nTo terminate the execution, just type CTRL+C in the same console.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvital%2Fdocker_flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvital%2Fdocker_flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvital%2Fdocker_flask/lists"}