This repository contains a Dockerfile for devpi pypi server. Based on https://github.com/muccg/docker-devpi.
You can use this container to speed up the pip install
parts of your
docker builds. This is done by adding an optional cache of your
requirement python packages and speed up docker. The outcome is faster
development without breaking builds.
Published on Docker hub as lieturd/devpi
.
Deploying this to kubernetes could be done with something like:
apiVersion: apps/v1
kind: Deployment
metadata:
name: pypi-cache
spec:
selector:
matchLabels:
app: pypi-cache
replicas: 1
template:
metadata:
labels:
app: pypi-cache
spec:
containers:
- name: pypi-cache
image: lieturd/devpi:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3141
name: pypi
---
apiVersion: v1
kind: Service
metadata:
name: pypi-cache
spec:
type: LoadBalancer
ports:
- port: 3141
name: pypi
protocol: TCP
targetPort: 3141
selector:
app: pypi-cache
For devpi to preserve its state across container shutdown and startup you
should mount a volume at /data
. The quickstart command already includes this.
Devpi creates a user named root by default, its password should be set
with DEVPI_PASSWORD
environment variable. If not set, a random one
will be generated.
For additional security the argument --restrict-modify root
has been
added so only the root may create users and indexes.
This project has been made possible thanks to Cocreators and Lietu. You can help us continue our open source work by supporting us on Buy me a coffee.