forked from muccg/docker-devpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (34 loc) · 1.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
FROM python:3.6.5
LABEL maintainer="https://github.com/muccg/"
ARG ARG_DEVPI_SERVER_VERSION=4.5.0
ARG ARG_DEVPI_WEB_VERSION=3.3.0
ARG ARG_DEVPI_CLIENT_VERSION=4.0.2
ENV DEVPI_SERVER_VERSION $ARG_DEVPI_SERVER_VERSION
ENV DEVPI_WEB_VERSION $ARG_DEVPI_WEB_VERSION
ENV DEVPI_CLIENT_VERSION $ARG_DEVPI_CLIENT_VERSION
ENV PIP_NO_CACHE_DIR="off"
ENV PIP_INDEX_URL="https://pypi.python.org/simple"
ENV PIP_TRUSTED_HOST="127.0.0.1"
ENV VIRTUAL_ENV /env
# devpi user
RUN addgroup --system --gid 1000 devpi \
&& adduser --disabled-password --system --uid 1000 --home /data --shell /sbin/nologin --gid 1000 devpi
# create a virtual env in $VIRTUAL_ENV, ensure it respects pip version
RUN pip install virtualenv \
&& virtualenv $VIRTUAL_ENV \
&& $VIRTUAL_ENV/bin/pip install pip==$PYTHON_PIP_VERSION
ENV PATH $VIRTUAL_ENV/bin:$PATH
RUN pip install \
"devpi-client==${DEVPI_CLIENT_VERSION}" \
"devpi-web==${DEVPI_WEB_VERSION}" \
"devpi-server==${DEVPI_SERVER_VERSION}"
EXPOSE 3141
VOLUME /data
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
USER devpi
ENV HOME /data
WORKDIR /data
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["devpi"]