forked from github.com/pypiserver
c10f31339d
* Used `find_packages()` in `setup.py` to ensure non-top-level packges would also be installed * Updated `.dockerignore` to include some other unnecessary items * Updated `__main__.py` to not bomb when `update_packages` is not in the `config` object (i.e. when using `pypiserver run`)
27 lines
576 B
Docker
27 lines
576 B
Docker
FROM python:3.6-alpine
|
|
|
|
# Build
|
|
COPY . /code
|
|
WORKDIR /code
|
|
|
|
RUN addgroup -S -g 9898 pypiserver && \
|
|
adduser -S -u 9898 -G pypiserver pypiserver && \
|
|
pip install .[passlib] && \
|
|
cd / && \
|
|
rm -rf /code && \
|
|
mkdir -p /data/packages && \
|
|
chown -R pypiserver:pypiserver /data/packages && \
|
|
# Set the setgid bit so anything added here gets associated with the
|
|
# pypiserver group
|
|
chmod g+s /data/packages
|
|
|
|
VOLUME /data/packages
|
|
USER pypiserver
|
|
WORKDIR /data
|
|
EXPOSE 8080
|
|
|
|
ENV PYPISERVER_PORT=8080
|
|
|
|
ENTRYPOINT ["pypiserver"]
|
|
CMD ["run", "packages"]
|