Skip to content

zzzsochi/docker-devpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Container With Devpi Server

A Docker image based on python:3.7-alpine3.8 that runs a devpi server (a PyPi Cache).

Usage

docker run -it --rm -p 3141:3141 --name devpi zzzsochi/devpi

Directory with persistent data: /srv/devpi.

docker run -it --rm -p 3141:3141 -v /local/path/to/data:/srv/devpi --name devpi zzzsochi/devpi

Automated initialization

Variable Description
DEVPISERVER_ROOT_PASSWORD Set password for root user
DEVPISERVER_USER Create user
DEVPISERVER_PASSWORD Password for user $DEVPISERVER_USER
DEVPISERVER_INDEX Create index named $DEVPISERVER_USER/$DEVPI_INDEX
DEVPISERVER_HOST Default: 0.0.0.0
DEVPISERVER_PORT Default: 3141

Example

docker run -it --rm --name devpi \
    -p 0.0.0.0:3141:3141 \
    -v /srv/devpi_data:/srv/devpi \
    -e DEVPISERVER_ROOT_PASSWORD=abracadabra \
    -e DEVPISERVER_USER=ci \
    -e DEVPISERVER_PASSWORD=else-abracadabra \
    -e DEVPISERVER_INDEX=mirror \
    zzzsochi/devpi

pip

Use a configuration similar to this in your ~/.pip/pip.conf:

[global]
index-url = http://localhost:3141/root/pypi/+simple/

setuptools

Use a configuration similar to this in your ~/.pydistutils.cfg:

[easy_install]
index_url = http://localhost:3141/root/pypi/+simple/