{"id":16358409,"url":"https://github.com/rcarmo/ubuntu-python","last_synced_at":"2025-03-23T01:31:58.719Z","repository":{"id":138322156,"uuid":"110483645","full_name":"rcarmo/ubuntu-python","owner":"rcarmo","description":"A base Docker container for running Python apps with an Ubuntu userland","archived":false,"fork":false,"pushed_at":"2021-06-13T08:48:04.000Z","size":50,"stargazers_count":14,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T16:22:36.084Z","etag":null,"topics":["ci-cd","docker","python"],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/rcarmo.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":"2017-11-13T01:06:40.000Z","updated_at":"2024-09-02T09:52:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"e31fd25c-5c6f-40ce-9325-0fa1c3330caa","html_url":"https://github.com/rcarmo/ubuntu-python","commit_stats":{"total_commits":64,"total_committers":2,"mean_commits":32.0,"dds":0.109375,"last_synced_commit":"dc3387a55e020eeaed359e3126b3fa2394ff1bac"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcarmo%2Fubuntu-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcarmo%2Fubuntu-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcarmo%2Fubuntu-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcarmo%2Fubuntu-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rcarmo","download_url":"https://codeload.github.com/rcarmo/ubuntu-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245044041,"owners_count":20551876,"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":["ci-cd","docker","python"],"created_at":"2024-10-11T02:05:34.158Z","updated_at":"2025-03-23T01:31:58.712Z","avatar_url":"https://github.com/rcarmo.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ubuntu-python\n\n[![Docker Stars](https://img.shields.io/docker/stars/rcarmo/ubuntu-python.svg)](https://hub.docker.com/r/rcarmo/ubuntu-python)\n[![Docker Pulls](https://img.shields.io/docker/pulls/rcarmo/ubuntu-python.svg)](https://hub.docker.com/r/rcarmo/ubuntu-python)\n[![](https://images.microbadger.com/badges/image/rcarmo/ubuntu-python.svg)](https://microbadger.com/images/rcarmo/ubuntu-python \"Get your own image badge on microbadger.com\")\n[![](https://images.microbadger.com/badges/version/rcarmo/ubuntu-python.svg)](https://microbadger.com/images/rcarmo/ubuntu-python \"Get your own version badge on microbadger.com\")\n\nA base Docker container for running Python apps with an Ubuntu userland, based on [alpine-python](https://github.com/rcarmo/alpine-python) and build for three different architectures:\n\n* `amd64`\n* `arm32v7` (Pi 2+ or other ARM 32-bit boards like the ODROID U2+)\n* `arm64v8` (Pi 4 or other ARM 64-bit boards, as well as the WSL images for Windows on ARM)\n\n## Why\n\n`alpine-python` makes for awesome small containers, but it's a pain to deal with all the binary wheels related to machine/deep learning stuff like Tensorflow, `numpy`, etc., so I decided to bite the bullet and take on the extra bloat that comes with an Ubuntu distro.\n\n## Status \u0026 Roadmap\n\n* [ ] Multi-stage, \"stripped\" builds (requires some tuning of the `onbuild` images)\n* [x] Multi-arch builds\n* [ ] CI builds (WIP due to long build times - Travis errors out)\n* [x] Python 3.8.5\n* [x] Python 3.7.5\n* [x] Python 3.7.3\n* [x] Normalize architecture tags (`arm32v7`, `amd64`, etc. to match Docker naming conventions)\n* [x] Python 3.7.0\n* [x] Move to Ubuntu 18.04 base image\n* [x] LTO (experimental) optimizations, inspired by [revsys](https://github.com/revsys/optimized-python-docker)\n* [x] Initial `armhf` containers\n* [x] Initial `amd64` containers, plain + `onbuild`\n* [x] Python 3.6.3 (`amd64`)\n* [x] Scaffolding for multiarch builds\n* [x] Base userland with required libraries for building Python 3.6\n\n\n## Usage\n\nThis image runs the `python` command on `docker run`. You can either specify your own command, e.g:\n```shell\ndocker run --rm -ti rcarmo/ubuntu-python python hello.py\n```\n\nOr extend this image using your custom `Dockerfile`, e.g:\n```dockerfile\nFROM rcarmo/ubuntu-python:onbuild\n# or FROM rcarmo/ubuntu-python:3.8-onbuild-amd64 if you prefer to specify your architecture\n\n# for a flask server\nEXPOSE 5000\nCMD python manage.py runserver\n```\n\nDont' forget to build _your_ image:\n```shell\ndocker build --rm=true -t rcarmo/app .\n```\n\nYou can also access `bash` inside the container:\n```shell\ndocker run --rm -ti rcarmo/ubuntu-python /bin/bash\n```\n\nAnother option is to build an extended `Dockerfile` version (like shown above), and mount your application inside the container:\n```shell\ndocker run --rm -v \"$(pwd)\":/home/app -w /home/app -p 5000:5000 -ti rcarmo/app\n```\n\n## Details\n\n* Builds the Python interpreter with optimizations enabled, for a significant performance boost\n* You can use the `latest` or `onbuild` tags, but every variant is tagged with its architecture and build step purpose\n* Uses `make altinstall` to have Python 3.8 coexist with the built-in Ubuntu Python (which is nearly impossible to eradicate anyway)\n* Just like the main `python` docker image, it creates useful symlinks that are expected to exist, e.g. `python3.8` \u003e `python`, `pip3.8` \u003e `pip`, etc.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcarmo%2Fubuntu-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcarmo%2Fubuntu-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcarmo%2Fubuntu-python/lists"}