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.
See https://bitbucket.org/pypa/bandersnatch/

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
documentation.

Example

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
Owner
janlo
Source Repository

Comments (1)
dgreene3p
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 <losinski@wh2.tu-dresden.de>

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 https://bitbucket.org/pypa/bandersnatch/raw/stable/requirements.txt"

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

COPY run.sh /usr/local/bin/run.sh

VOLUME /srv/pypi
CMD ["/usr/local/bin/run.sh"]