pypi caching service using devpi and docker
1.7K
This repository contains Dockerfile of Devpi for Docker's trusted build published to the public Docker Registry.
note: this is a fork of scrapinghub/docker-devpi
Install Docker.
Download trusted build from public Docker Registry: docker pull xetusoss/devpi
(alternatively, you can build an image from Dockerfile: docker build -t="xetusoss/devpi" github.com/xetus-oss/docker-devpi)
devpi-serverdocker run -d --name devpi -p 3141:3141 xetusoss/devpi
Devpi creates a user named root by default, its password can be set with
DEVPI_PASSWORD environment variable.
devpi-server with Fully Configured LDAP SupportThe devpi-ldap plugin comes pre-installed in the Docker image with a couple of options for configuring LDAP in the devpi instance:
Specify a devpi-ldap YAML configuration file using the DEVPI_LDAP_CONFIG_PATH environment variable (see
the documentation for devpi-ldap). Note that the path must be an absolute path accessible within the docker container:
docker run -d --name devpi -p 3141:3141 \
-v /your/devpi_data/dir:/mnt \
-e DEVPI_LDAP_CONFIG_PATH=/mnt/ldap-config.yml \
xetusoss/devpi
Specify the LDAP configurations using environment variables and let the dockerfile generate the configuration for you:
docker run -d --name devpi -p 3141:3141 \
-e LDAP_HOST_URL=ldap://example.com \
-e LDAP_USER_TEMPLATE="CN={username},CN=Partition1,DC=Example,DC=COM" \
-e LDAP_GROUP_SEARCH_BASE="CN=Partition1,DC=Example,DC=COM" \
-e LDAP_GROUP_SEARCH_FILTER="(&(objectClass=group)(member={userdn}))" \
-e LDAP_GROUP_SEARCH_ATTR_NAME="CN" \
xetusoss/devpi
devpi-server with devpi-server ImportYou can initialize the DEVPI_SERVERDIR from a directory created using a devpi-server --export command by using the DEVPI_IMPORT_DIR variable (the DEVPI_PASSWORD variable will be ignored):
docker run -d --name devpi -p 3141:3141 \
-v /your/devpi_data/dir:/mnt \
-e DEVPI_IMPORT_DIR=/mnt/devpi-export/ \
xetusoss/devpi
The following environment variables are exposed to automate as much of the setup and configuration process as possible:
--outside-url option for the devpi-server command--restrict-modify option for the devpi-server command/mnt/devpi-server). The DEVPI_PASSWORD variable will be ignored since the root account (including password) should be imported from the export dataurl parameter in the devpi-ldap YAML configuration file. The YAML file pointed to DEVPI_LDAP_CONFIG_PATH will take precedence if both LDAP_HOST_URL and DEVPI_LDAP_CONFIG_PATH are passeduser_template parameter in the devpi-ldap YAML configuration file. This will take precedence over any of the user_search parameters if LDAP_USER_TEMPLATE and any of the user_search variables are specifieduser_search/base parameter in the devpi-ldap YAML configuration file. Will be ignored if LDAP_USER_TEMPLATE is specifieduser_search/filter parameter in the devpi-ldap YAML configuration file. Will be ignored if LDAP_USER_TEMPLATE is specifieduser_search/attribute_name parameter in the devpi-ldap YAML configuration file. Will be ignored if LDAP_USER_TEMPLATE is specifiedgroup_search/base parameter in the devpi-ldap YAML configuration filegroup_search/filter parameter in the devpi-ldap YAML configuration filegroup_search/attribute_name parameter in the devpi-ldap YAML configuration fileContent type
Image
Digest
Size
39.5 MB
Last updated
almost 9 years ago
docker pull xetusoss/devpi