{"id":18572369,"url":"https://github.com/nick-lehmann/poetrydocker","last_synced_at":"2026-04-18T11:01:41.630Z","repository":{"id":78110758,"uuid":"227621685","full_name":"nick-lehmann/PoetryDocker","owner":"nick-lehmann","description":"Poetry inside Docker","archived":false,"fork":false,"pushed_at":"2019-12-12T22:13:15.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-15T23:08:51.129Z","etag":null,"topics":["docker","docker-image","poetry","python","python3"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/nicklehmann/poetry","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/nick-lehmann.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,"zenodo":null}},"created_at":"2019-12-12T14:08:38.000Z","updated_at":"2023-05-31T12:43:21.000Z","dependencies_parsed_at":"2023-03-02T23:46:11.457Z","dependency_job_id":null,"html_url":"https://github.com/nick-lehmann/PoetryDocker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nick-lehmann/PoetryDocker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-lehmann%2FPoetryDocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-lehmann%2FPoetryDocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-lehmann%2FPoetryDocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-lehmann%2FPoetryDocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nick-lehmann","download_url":"https://codeload.github.com/nick-lehmann/PoetryDocker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-lehmann%2FPoetryDocker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31966217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","docker-image","poetry","python","python3"],"created_at":"2024-11-06T23:06:01.438Z","updated_at":"2026-04-18T11:01:41.624Z","avatar_url":"https://github.com/nick-lehmann.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"Poetry inside Docker\n====================\n\nThis dockerfile contains the awesome new Python packaging tools [Poetry](https://github.com/python-poetry/poetry), created by [Sébastien Eustace](https://github.com/sdispater).\n\n\n## How to use this image\n\n```bash\n$ docker run -it --rm nicklehmann/poetry:py3.7-preview-alpine \nPoetry version 1.0.0b9\n\nUSAGE\n  poetry [-h] [-q] [-v [\u003c...\u003e]] [-V] [--ansi] [--no-ansi] [-n] \u003ccommand\u003e [\u003carg1\u003e] ... [\u003cargN\u003e]\n\nARGUMENTS\n  \u003ccommand\u003e              The command to execute\n  \u003carg\u003e                  The arguments of the command\n\nGLOBAL OPTIONS\n    [...]\n\nAVAILABLE COMMANDS\n    [...]\n```\n\nThe image behaves like you are using `poetry` installed normally. So you can just append the commands and options as you normally would.\n\n```bash\n$ docker run -it --rm nicklehmann/poetry:py3.7-preview-alpine install --help\nBusyBox v1.30.1 (2019-06-12 17:51:55 UTC) multi-call binary.\n\nUsage: install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [-t DIR] [SOURCE]... DEST\n\nCopy files and set attributes\n\n\t-c\tJust copy (default)\n\t-d\tCreate directories\n\t-D\tCreate leading target directories\n\t-s\tStrip symbol table\n\t-p\tPreserve date\n\t-o USER\tSet ownership\n\t-g GRP\tSet group ownership\n\t-m MODE\tSet permissions\n\t-t DIR\tInstall to DIR\n```\n\nYou can also base your own image on this as follows:\n\n```dockerfile\nFROM nicklehmann/poetry:py3.7-latest-alpine\n\nARG STAGE\n\nADD poetry.lock pyproject.toml ./\nRUN poetry install $(test \"$STAGE\" == production \u0026\u0026 echo \"--no-dev\") --no-interaction --no-ansi\n\nCOPY . .\n\nCMD [\"python\", \"yourscript.py\"]\n```\n\nNormal installation\n-------------------\n\nInstead of downloading the installation script from the internet and executing it, `poetry` is installed manually using `virtualenv` and `pip`. I am not a fan of piping content from the internet in my build scripts / CI and decided against that. Furthermore, it is not totally clear to me what the `get-poetry.py` does. Therefore, installing it like any other python CLI tool is much more clear to me.\n\n\nVirtualenv\n----------\n\nIn this image, `poetry` installs dependencies into the system `site-packages`. There is no point in creating virtualenvs inside docker containers. While some might argue that this is a more natural flow for experienced python programmers, for me this is just the case if you also work with normal virtualenvs. Because I try to use docker containers everywhere, installing everything at system level makes more sense and the integration with tools like `PyCharm` easier.\n\n\nContribute\n==========\n\nIf you want to generate all dockerfiles after having made a change, execute the `generate.sh` script. It will invoke `fish-pepper` as a docker container, generate the dockerfiles and move them to the top-level directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnick-lehmann%2Fpoetrydocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnick-lehmann%2Fpoetrydocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnick-lehmann%2Fpoetrydocker/lists"}