{"id":20590246,"url":"https://github.com/eitancj/python_in_docker","last_synced_at":"2026-04-28T16:07:28.178Z","repository":{"id":185430233,"uuid":"673526916","full_name":"eitancj/python_in_docker","owner":"eitancj","description":"Playing around with docker images, python and streamlit","archived":false,"fork":false,"pushed_at":"2023-09-11T14:29:27.000Z","size":1057,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T13:41:06.626Z","etag":null,"topics":["container-image","containerization","docker","dockerfile","python","python-docker","python3","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","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/eitancj.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}},"created_at":"2023-08-01T20:43:55.000Z","updated_at":"2023-09-19T20:26:24.000Z","dependencies_parsed_at":"2023-09-11T15:45:06.817Z","dependency_job_id":"8b31da8d-aaff-4240-bd24-6ff4b121781a","html_url":"https://github.com/eitancj/python_in_docker","commit_stats":null,"previous_names":["eitancj/streamlitapp","eitancj/streamlit_app","eitancj/python_in_docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eitancj/python_in_docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitancj%2Fpython_in_docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitancj%2Fpython_in_docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitancj%2Fpython_in_docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitancj%2Fpython_in_docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eitancj","download_url":"https://codeload.github.com/eitancj/python_in_docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitancj%2Fpython_in_docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263691540,"owners_count":23496872,"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":["container-image","containerization","docker","dockerfile","python","python-docker","python3","streamlit"],"created_at":"2024-11-16T07:34:47.294Z","updated_at":"2026-04-28T16:07:23.155Z","avatar_url":"https://github.com/eitancj.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Using Docker to Containerize a Python App\n\n![](https://github.com/eitancj/preview_images/blob/main/python_in_docker.png?raw=true)\n\\\nJust experimenting with building Docker images.  \nContainerizing a Python3-Streamlit app, in this case.\n\nInspired by [this](https://app.pluralsight.com/guides/dockerfile-for-python-web-projects) short guide which I recommend.\n\n### Pre-installed on your machine\n- Git\n- Docker\n\n*A simple way to work with Docker images locally:*\\\nhttps://www.docker.com/products/docker-desktop/\n\n### Tech Stack\n- Tested on macOS X\n- Python 3.11.4\n- Streamlit\n- Debian-based container\n\n### Running the App\n\n1. Clone git repo \u0026 cd into it\n```\ngit clone https://github.com/eitancj/python_in_docker\ncd python_in_docker\n```\n\n2. Build image\n```\ndocker build -t python_in_docker:V1 .\n\n# May take a few minutes: Streamlit is relatively heavy\n```\n\n3. Verify image creation   \n```\ndocker images python_in_docker\n```\n\n4. Run app\n```\ndocker run -d --rm -p 8501:8501 --name pydock python_in_docker:V1\n\n# Make sure no other running process is using that port on your machine\n```\n\n5. Test app\n```\nopen http://localhost:8501 # will open in your default web browser\n\n# Or simply copy and paste the address into your web browser\n```\n\n6. Gracefully stop (and remove) container when you're done\n```\ndocker container stop pydock\n```\n\n7. Remove the created image\n```\ndocker rmi python_in_docker:V1\n```\n\n8. Clean up local copy (unless you want to keep it)\n```\ncd .. \u0026\u0026 rm -rf python_in_docker\n\n# BE PRUDENT WITH 'rm -rf'.\n# Make sure you're in the right directory and aiming at the right folder.\n```\n\n9. That's it\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feitancj%2Fpython_in_docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feitancj%2Fpython_in_docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feitancj%2Fpython_in_docker/lists"}