forked from muccg/docker-devpi
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
38 lines (30 loc) · 1017 Bytes
/
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
#
FROM python:3.6.5
LABEL maintainer="https://github.com/muccg/"
ARG ARG_DEVPI_SERVER_VERSION=5.5.0
ARG ARG_DEVPI_WEB_VERSION=4.0.2
ARG ARG_DEVPI_CLIENT_VERSION=5.2.0
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
# 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
ENV HOME /data
WORKDIR /data
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["devpi"]