Public | Automated Build

Last pushed: 6 days ago
Short Description
This is a PyPI mirror client container according to PEP 381
Full Description

Pypi mirror client

This image contains a bandersnatch PEP 381 mirror.

How to use this Image

It runs the bandersnatch client with the mirror command.
You should run it as non-daemon container with a volume
mounted on /srv/pypi. See upstream project for full


Assuming you have mounted your storage for the pypi-mirror
on the host at /mnt/pypi_data:

docker run --rm -v /mnt/pypi_data:/srv/pypi janlo/bandersnatch:latest
Docker Pull Command
Source Repository

Comments (1)
a month ago

I had to make some dockerfile changes for this to work - some of the python dependencies were getting in your way - here's what I ended with:

FROM debian:stretch

MAINTAINER Jan Losinski <>

RUN apt-get update && \
    apt-get -y install --no-install-recommends \
        python3-venv \
        python-dev \
        ca-certificates \
        python-pip \
    && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN groupadd user && \
    useradd --uid 1000 --create-home --home-dir /home/user -g user user

WORKDIR /home/user

RUN su user -c "python3 -m venv ./bandersnatch-env  && \
        . ./bandersnatch-env/bin/activate && \
        pip install -r"

COPY default.conf /etc/bandersnatch.conf
RUN chown user:user /etc/bandersnatch.conf

COPY /usr/local/bin/

VOLUME /srv/pypi
CMD ["/usr/local/bin/"]