{"id":23859142,"url":"https://github.com/angelospanag/fastapi-podman","last_synced_at":"2026-05-12T23:32:33.700Z","repository":{"id":80607830,"uuid":"446407227","full_name":"angelospanag/fastapi-podman","owner":"angelospanag","description":"An example project using Podman to run a container with Python/FastAPI to create a web server and Poetry for dependency management.","archived":false,"fork":false,"pushed_at":"2023-12-27T20:20:10.000Z","size":65,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-22T10:52:39.048Z","etag":null,"topics":["aws-ecr","fastapi","podman","poetry","python"],"latest_commit_sha":null,"homepage":"","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/angelospanag.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":"2022-01-10T12:07:42.000Z","updated_at":"2024-10-29T03:52:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9fc69b9-45b3-43d2-a1ff-bb88d76daadf","html_url":"https://github.com/angelospanag/fastapi-podman","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/angelospanag/fastapi-podman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelospanag%2Ffastapi-podman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelospanag%2Ffastapi-podman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelospanag%2Ffastapi-podman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelospanag%2Ffastapi-podman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angelospanag","download_url":"https://codeload.github.com/angelospanag/fastapi-podman/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelospanag%2Ffastapi-podman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32961781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"ssl_error","status_checked_at":"2026-05-12T23:30:18.191Z","response_time":102,"last_error":"SSL_read: 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":["aws-ecr","fastapi","podman","poetry","python"],"created_at":"2025-01-03T03:32:10.273Z","updated_at":"2026-05-12T23:32:33.685Z","avatar_url":"https://github.com/angelospanag.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastapi-podman\n\nAn example project using [Podman](https://podman.io/) to run a container with [Python/FastAPI](https://fastapi.tiangolo.com/) for creating a web server and [Poetry](https://python-poetry.org/) for dependency management.\n\n## Podman installation\n\n### Ubuntu/WSL (using `apt`)\n```bash\nsudo apt install podman\n```\n\n### MacOS (using `brew`)\n```bash\nbrew install podman\n```\n\n## Podman configuration\nThe following commands initialise and run `podman` as a daemon on your machine.\n### 1. Initialise `podman`\n```bash\npodman machine init\n```\n\n### 2. Start `podman` daemon\n```bash\npodman machine start\n```\nExample output:\n```bash\nINFO[0000] waiting for clients...\nINFO[0000] listening tcp://127.0.0.1:7777\nINFO[0000] new connection from  to /var/folders/n1/wk2myqkx66vf483r8qg7l2880000gn/T/podman/qemu_podman-machine-default.sock\nWaiting for VM ...\nMachine \"podman-machine-default\" started successfully\n```\n\n## Podman usage\n\nThe following `podman` commands are direct replacements of the Docker CLI. You can see that their syntax is identical:\n\n### 1. Build image and tag it as `fastapi-podman`\n\nThe following command uses the `Dockerfile` that is present on the root of the project to build an image. \n\nNotice that there is no difference in the `Dockerfile` syntax and it can be used 'as is' between Docker and Podman. It still uses [Docker Hub](https://hub.docker.com/_/python/) to fetch the official Python image that is defined in it (`FROM python:3.11`).\n```bash\npodman image build -t fastapi-podman .\n```\n\n### 2. Run a container of the previously tagged image (`fastapi-podman`)\n\nRun our FastAPI application and map our local port `8000` to `80` on the running container:\n```bash\npodman container run -d --name fastapi-podman -p 8000:80 --network bridge fastapi-podman\n```\n\n### 3. Check running containers\n```bash\npodman ps\n```\n```bash\nCONTAINER ID  IMAGE                            COMMAND               CREATED         STATUS             PORTS                 NAMES\n78586e5b4683  localhost/fastapi-podman:latest  uvicorn main:app ...  13 minutes ago  Up 13 minutes ago  0.0.0.0:8000-\u003e80/tcp  nifty_roentgen\n```\n### 4. Hit sample endpoint\nOur FastAPI server now runs on port `8000` on our local machine. We can test it with:\n```\ncurl http://localhost:8000\n```\nOutput:\n```json\n{\"Hello\":\"World\"}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelospanag%2Ffastapi-podman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangelospanag%2Ffastapi-podman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelospanag%2Ffastapi-podman/lists"}