{"id":30138566,"url":"https://github.com/ragedunicorn/docker-python","last_synced_at":"2026-05-08T09:34:28.564Z","repository":{"id":307281018,"uuid":"1026915307","full_name":"RagedUnicorn/docker-python","owner":"RagedUnicorn","description":"Repository for Docker python image based on Alpine","archived":false,"fork":false,"pushed_at":"2026-03-10T09:27:51.000Z","size":145,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-10T16:07:25.793Z","etag":null,"topics":["alpine","alpine-linux","docker","docker-container","docker-image","python"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/ragedunicorn/python","language":"Dockerfile","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/RagedUnicorn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-26T22:28:43.000Z","updated_at":"2026-03-10T08:51:51.000Z","dependencies_parsed_at":"2025-07-30T12:59:37.953Z","dependency_job_id":"7f34b617-128d-4210-beb8-2e8d580e2f7a","html_url":"https://github.com/RagedUnicorn/docker-python","commit_stats":null,"previous_names":["ragedunicorn/docker-python"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/RagedUnicorn/docker-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fdocker-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fdocker-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fdocker-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fdocker-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RagedUnicorn","download_url":"https://codeload.github.com/RagedUnicorn/docker-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fdocker-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32775037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["alpine","alpine-linux","docker","docker-container","docker-image","python"],"created_at":"2025-08-11T01:37:15.062Z","updated_at":"2026-05-08T09:34:28.544Z","avatar_url":"https://github.com/RagedUnicorn.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-python\n\n![](./docs/docker_python.png)\n\n[![Release Build](https://github.com/ragedunicorn/docker-python/actions/workflows/docker_release.yml/badge.svg)](https://github.com/ragedunicorn/docker-python/actions/workflows/docker_release.yml)\n[![Test](https://github.com/ragedunicorn/docker-python/actions/workflows/test.yml/badge.svg)](https://github.com/ragedunicorn/docker-python/actions/workflows/test.yml)\n![License: MIT](docs/license_badge.svg)\n\n\u003e Docker Alpine image with Python and pip.\n\n![](./docs/alpine_linux_logo.svg)\n\n## Overview\n\nThis Docker image provides a minimal Python installation built on Alpine Linux. It uses Alpine's Python packages but removes the PEP 668 restriction, allowing you to install packages with pip without additional flags or virtual environments.\n\n## Features\n\n- **Small footprint**: ~50MB runtime image using Alpine Linux\n- **Python 3.12.11**: Alpine packages with PEP 668 restriction removed\n- **Minimal installation**: Only Python and pip included\n- **Non-root user**: Enhanced security with dedicated python user\n- **Volume mounting**: Easy code and data access through `/app`\n\n## Quick Start\n\n```bash\n# Pull the image\ndocker pull ragedunicorn/python:latest\n\n# Run Python interactively\ndocker run -it --rm ragedunicorn/python:latest\n```\n\nFor development and building from source, see [DEVELOPMENT.md](DEVELOPMENT.md).\n\n## Usage\n\nThe container uses Python as the entrypoint, so any Python parameters can be passed directly to the `docker run` command.\n\n### Basic Usage\n\n```bash\n# Using latest version\ndocker run -v $(pwd):/app ragedunicorn/python:latest [python-options]\n\n# Using specific Python version (latest Alpine build)\ndocker run -v $(pwd):/app ragedunicorn/python:3 [python-options]\n\n# Using exact version combination\ndocker run -v $(pwd):/app ragedunicorn/python:3-alpine3.22.1-1 [python-options]\n```\n\n### Examples\n\n#### Run Python Script\n```bash\ndocker run -v $(pwd):/app ragedunicorn/python:latest script.py\n```\n\n#### Interactive Python Shell\n```bash\ndocker run -it --rm ragedunicorn/python:latest\n```\n\n#### Execute Python Code\n```bash\ndocker run --rm ragedunicorn/python:latest -c \"print('Hello, World!')\"\n```\n\n#### Install Package and Run\n```bash\ndocker run -v $(pwd):/app ragedunicorn/python:latest /bin/sh -c \"pip install requests \u0026\u0026 python script.py\"\n```\n\n#### Check Python Version\n```bash\ndocker run --rm ragedunicorn/python:latest --version\n```\n\n#### Run Tests\n```bash\ndocker run -v $(pwd):/app ragedunicorn/python:latest /bin/sh -c \"pip install pytest \u0026\u0026 python -m pytest\"\n```\n\n## Docker Compose Usage\n\nThis repository includes Docker Compose configurations for easier usage and common Python development workflows.\n\n### Basic Setup\n\n1. Create an `app` directory:\n```bash\nmkdir -p app\n```\n\n2. Place your Python files in `app/`\n\n3. Run Python using docker compose:\n```bash\ndocker compose run --rm python script.py\n```\n\n### Example Configuration\n\nThe `examples/` directory contains a hello-world example:\n\n#### Hello World Example (`examples/docker-compose.yml`)\n```bash\n# Run the hello world example\ncd examples \u0026\u0026 docker compose run --rm hello-world\n```\n\n### Environment Variables\n\nThe compose configuration supports:\n\n- `PYTHON_VERSION`: Specify Python image version (default: latest)\n- `PYTHONUNBUFFERED`: Unbuffered output (set to 1)\n- `TERM`: Terminal type for colored output\n\n### Tips\n\n1. **Custom Commands**: Override the default command:\n   ```bash\n   docker compose run --rm python -c \"import sys; print(sys.version)\"\n   ```\n\n2. **Development Mode**: Use the development compose file for building locally:\n   ```bash\n   docker compose -f docker-compose.dev.yml build\n   docker compose -f docker-compose.dev.yml run --rm python script.py\n   ```\n\n3. **Persistent Settings**: The repository includes a `.env` file with default settings:\n   ```env\n   PYTHON_VERSION=latest\n   ```\n\n## Building Custom Images\n\nTo create a custom image with your required packages:\n\n```dockerfile\nFROM ragedunicorn/python:latest\n\n# Install Python packages\nUSER root\nRUN pip install requests numpy pandas\nUSER python\n\n# Copy your application\nWORKDIR /app\nCOPY . .\n\nCMD [\"python\", \"app.py\"]\n```\n\n## Versioning\n\nThis project uses semantic versioning that matches the Docker image contents:\n\n**Format:** `{python_major_version}-alpine{alpine_version}-{build_number}`\n\nExamples:\n- `3-alpine3.22.1-1` - Python 3 on Alpine 3.22.1, build 1\n- `latest` - Most recent stable release\n\nFor detailed release process and versioning guidelines, see [RELEASE.md](RELEASE.md).\n\n## Automated Dependency Updates\n\nThis project uses [Renovate](https://docs.renovatebot.com/) to automatically check for updates to:\n- Alpine Linux base image version (all major, minor, and patch updates)\n\nRenovate runs weekly (every Monday) and creates pull requests when updates are available. The configuration tracks Alpine Linux releases, creating pull requests for each update.\n\n## Documentation\n\n- [Development Guide](DEVELOPMENT.md) - Building, debugging, and contributing\n- [Testing Guide](TEST.md) - Running and writing tests\n- [Release Process](RELEASE.md) - Creating releases and versioning\n\n## Links\n\n- [Python Documentation](https://docs.python.org/)\n- [Alpine Linux](https://www.alpinelinux.org/)\n\n# License\n\nMIT License\n\nCopyright (c) 2025 Michael Wiesendanger\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragedunicorn%2Fdocker-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fragedunicorn%2Fdocker-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragedunicorn%2Fdocker-python/lists"}