Multi-arch devpi: PyPI caching proxy + private index (amd64/arm64/armv7).
1.4K
A lightweight, multi-arch devpi (PyPI caching & private index) image built from python:3.12-slim. It provides a fast local PyPI cache plus simple private package hosting for CI/CD and air-gapped or bandwidth-sensitive environments. Ships with devpi-server and devpi-web, a healthcheck, configurable versions, and non-root execution.
• Multi-Arch: Build or pull for linux/amd64, linux/arm64, linux/arm/v7. • Version Pinning: Override devpi-server and devpi-web versions via build args for reproducibility. • Non-Root User: Runs as an unprivileged devpi user by default. • Persistent Data: Single mountable volume at /data holding indices, packages, and state. • Auto-Init: First container start initializes the server directory if empty. • Built-In Healthcheck: Simple HTTP probe to / every 30s. • Minimal Base: Slim Python image with only required packages.
• 3141 (HTTP UI and API)
• /data (must be persisted for index state & cached packages)
• DEVPI_SERVERDIR (default /data) • DEVPI_HOST (default 0.0.0.0) • DEVPI_PORT (default 3141)
Most deployments keep defaults; adjust only if embedding behind another process.
• PYTHON_VERSION (default 3.12-slim) • DEVPI_SERVER_VERSION (pin devpi-server, e.g. 6.12.1) • DEVPI_WEB_VERSION (pin devpi-web, e.g. 4.0.0) • APP_UID / APP_GID (match host UID/GID for volume permissions)
docker run -p 3141:3141 yourrepo/devpi:latest (Initializes ephemeral in-container /data; not persisted.)
Production / Persistent
docker run -d \ -p 3141:3141 \ -v devpi-data:/data \ --name devpi gdssouza/devpi:latest
Then browse: http://localhost:3141/
devpi use http://<host>:3141
devpi login root --password <password>
devpi index -c myproj bases=root/pypi
Point pip to root/pypi mirror (read-through cache): pip install --index-url http://:3141/root/pypi/+simple
Container defines a HEALTHCHECK performing an HTTP request to /. Docker marks unhealthy if 3 consecutive failures occur (30s interval, 5s timeout).
docker buildx build \ --platform linux/amd64,linux/arm64,linux/arm/v7 \ -t yourrepo/devpi:latest -f devpi.Dockerfile --push .
docker buildx build \ --platform linux/amd64,linux/arm64 \ --build-arg DEVPI_SERVER_VERSION=6.12.1 \ --build-arg DEVPI_WEB_VERSION=4.0.0 \ -t yourrepo/devpi:6.12.1 -f devpi.Dockerfile --push .
• Runs non-root; keep volume permissions aligned with APP_UID/APP_GID. • Place behind a reverse proxy for TLS (e.g. Nginx / Traefik). • Restrict network access if hosting private packages. • Consider enabling network-level caching restrictions or IP allowlists via upstream proxy.
• Stuck init: ensure /data writable by UID/GID used.
• Unhealthy status: check logs (docker logs devpi) for tracebacks.
• Architecture mismatch: verify manifest (docker manifest inspect :tag).
[global] index-url = http://:3141/root/pypi/+simple trusted-host =
Image bundles devpi-server & devpi-web (see their respective licenses). Python base image per upstream terms.
Content type
Image
Digest
sha256:892b7f15d…
Size
70.5 MB
Last updated
11 months ago
docker pull gdssouza/devpi