Sign inSign up

sumizadocker/python-git

By sumizadocker

•Updated about 12 hours ago

Python Docker image that installs packages, clones repos, and runs scripts with simple env vars.

Image
0

50K+

sumizadocker/python-git repository overview

⁠Python Git Docker Image

Updated to use Python 3.14

This Docker image is based on the official python⁠ image, with additional tools installed such as pip,git and entrypoint scripts to facilitate cloning GitHub repositories and installing packages.

⁠Features

The entrypoint supports:

  • Installing packages via apt or apk
  • Installing Python packages via pip
  • Cloning public or private GitHub repositories (with token)
  • Setting a custom working directory
  • Auto-installation by parsing Python files (⚠️ use with extreme caution)

Docker Hub:
👉 https://hub.docker.com/r/sumizadocker/python-git⁠


⁠Example (Docker CLI)

docker run --rm \
  -e USER='Sumiza' \
  -e REPO='Scripts' \
  -e INSTALL='nano' \
  -e PIP_INSTALL='requests' \
  sumizadocker/python-git \
  python main.py

⁠Example (Docker Compose)

services:
  python-git:
    image: sumizadocker/python-git:latest
    environment:
      USER: sumiza
      REPO: scripts
      PIP_INSTALL: 'requests'
      INSTALL: nano
    command: "python main.py"

⁠Environment Variables

VariableDescriptionExample
INSTALLSpace-separated system packages to install (apt or apk).INSTALL="nano curl"
PIP_INSTALLSpace-separated Python packages to install with pip.PIP_INSTALL="requests numpy"
TOKENGitHub access token for cloning private repos.TOKEN="ghp_xxx"
USERGitHub username to clone repo from.USER="Sumiza"
REPOGitHub repository name to clone.REPO="Scripts"
DIRECTORYDirectory to switch into after cloning or before running.DIRECTORY="src"
AUTO_INSTALLAutomatically install Python packages based on import statements in .pyAUTO_INSTALL="true"

Tag summary

Content type

Image

Digest

sha256:aeb03395f…

Size

370.5 MB

Last updated

about 13 hours ago

docker pull sumizadocker/python-git