mirror of
https://github.com/pypiserver/pypiserver
synced 2024-11-09 16:45:51 +01:00
9edae77659
* feat: markdown conversion logo and badges * feat: markdown conversion fix logo path * feat: markdown table changes * feat: markdown table alignment * feat: markdown check toc * feat: markdown toc additions * feat: markdown quickstart section * feat: dependabot more details section in quick start * feat: dependabot correct bold * feat: markdown client side config, pip * feat: markdown typo in title * feat: markdown typo in configuring pip * feat: markdown apache like authentication section an initial cut to view the markdown in github * feat: markdown typo in markdown link * feat: markdown remove trailing colon * feat: markdown typo in shell markdown * feat: markdown standardize on 4 space indent in shell code block * feat: markdown complete markdown for section up to alternate installation methods * feat: markdown add more of the contents to test with * feat: markdown contents * feat: markdown contents * feat: markdown contents * feat: markdown dquote> dquote> recipes * feat: markdown dquote> dquote> recipes * feat: markdown dquote> dquote> up to licensing * feat: markdown dquote> dquote> contents * Update README.md Missing exclamation mark * Update README.md missing link * Update README.md remove duplicated text * Update README.md bold differences it Table of contents * Update README.md additional bold changes in table of contents * Update README.md broken link * Update README.md typo in link fix * Update README.md change code block to text as shell highlighting was showing some items in red * Update README.md code block shell to text * Update README.md correct pypi-server update section * feat: markdown dquote> dquote> link back to TOC title * Update README.md change link to TOC title * Update README.md link test * Update README.md link update * Update README.md link update * Update README.md link update * feat: markdown links * Update README.md change the level of indent for uploading packages remotely * Update README.md add link to python-pam * feat: markdown apache link to TOC not working. * Update README.md grammar * Update README.md typo bold * feat: markdown undo bolded text in TOC and titles as linking does not work * feat: markdown remove bold from TOC * feat: feature more link issues * feat: markdown fixing broken links * feat: markdown change text slightly as markdown only links to plain text * feat: markdown typo * feat: markdown more link typos * Update README.md typo in link * Update README.md link will not work with braces in the titles * feat: markdown run mdformat and apply changes, :) lint! * feat: markdown - check via mdformat - remove old check script - update test-requirements.txt * feat: markdown correct the errors in the mdformat run command * feat: markdown for testing remove all the actual jobs * feat: markdown re-run mdformat * feat: markdown put the jobs back in after testing the mdformat cmd for passing and failing via workflow dispatch * feat: markdown remove references to README.md * feat: markdown change action to workflow dispatch for testing * feat: markdown - update docker igore - alter unit test to look for version number after md changes * feat: markdown black linting * feat: markdown update comments * feat: markdown update bumpver to look at md rather than rst file * feat: markdown replace workflow dispatch with pull request to get ready for the final PR * feat: markdown-delete-original delete the original rst file * feat: markdown-delete-original change ci to workflow dispatch for testing * feat: markdown-delete-original revert workflow dispatch * feat: markdown-badge-links set the links back to the original URLs. * feat: markdown-badge-links fix brackets * feat: markdown update the version and date * feat: markdown conversion markdown changes to conform to mdformat tooling.
86 lines
2.7 KiB
Docker
86 lines
2.7 KiB
Docker
FROM python:3.8-alpine3.12 as base
|
|
|
|
# Copy the requirements & code and install them
|
|
# Do this in a separate image in a separate directory
|
|
# to not have all the build stuff in the final image
|
|
FROM base AS builder_gosu
|
|
|
|
ENV GOSU_VERSION 1.12
|
|
|
|
RUN apk add --no-cache --virtual .build-deps \
|
|
ca-certificates \
|
|
dpkg \
|
|
gnupg \
|
|
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
|
|
&& wget -O /usr/local/bin/gosu https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch} \
|
|
&& wget -O /usr/local/bin/gosu.asc https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}.asc \
|
|
# verify the signature
|
|
&& export GNUPGHOME="$(mktemp -d)" \
|
|
&& gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
|
|
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
|
|
&& command -v gpgconf && gpgconf --kill all || true \
|
|
&& rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \
|
|
&& chmod +x /usr/local/bin/gosu \
|
|
# check installation
|
|
&& gosu --version \
|
|
&& gosu nobody true \
|
|
&& apk del --no-cache \
|
|
.build-deps \
|
|
&& rm -rf /var/cache/apk/* \
|
|
&& rm -rf /tmp/*
|
|
|
|
FROM base AS builder_dependencies
|
|
|
|
WORKDIR /code
|
|
|
|
COPY docker/docker-requirements.txt .
|
|
|
|
# Install requirements
|
|
RUN apk add --no-cache --virtual .build-deps \
|
|
build-base \
|
|
libffi-dev \
|
|
&& mkdir /install \
|
|
&& python -m pip install \
|
|
--no-warn-script-location \
|
|
--prefix=/install \
|
|
--requirement docker-requirements.txt
|
|
|
|
# Install pypiserver
|
|
# - do this separately from deps so that when developing, every change does not
|
|
# require reinstalling deps
|
|
COPY pypiserver pypiserver
|
|
COPY setup.cfg .
|
|
COPY setup.py .
|
|
COPY README.md .
|
|
RUN python -m pip install --no-warn-script-location --prefix=/install .
|
|
|
|
FROM base
|
|
|
|
WORKDIR /data
|
|
# Copy the libraries installed via pip
|
|
COPY --from=builder_dependencies /install /usr/local
|
|
COPY --from=builder_gosu /usr/local/bin/gosu /usr/local/bin/gosu
|
|
COPY docker/entrypoint.sh /entrypoint.sh
|
|
COPY docker/gunicorn.conf.py /data
|
|
|
|
# Use a consistent user and group ID so that linux users
|
|
# can create a corresponding system user and set permissions
|
|
# if desired.
|
|
RUN apk add bash \
|
|
&& rm -rf /var/cache/apk/* \
|
|
&& rm -rf /tmp/* \
|
|
&& addgroup -S -g 9898 pypiserver \
|
|
&& adduser -S -u 9898 -G pypiserver pypiserver --home /data\
|
|
&& mkdir -p /data/packages \
|
|
&& chmod +x /entrypoint.sh
|
|
|
|
VOLUME /data/packages
|
|
ENV PYPISERVER_PORT=8080
|
|
# PORT is deprecated. Please use PYPISERVER_PORT instead
|
|
ENV PORT=$PYPISERVER_PORT
|
|
# Flush logs immediately to stdout
|
|
ENV PYTHONUNBUFFERED=t
|
|
EXPOSE $PYPISERVER_PORT
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|