forked from muccg/docker-devpi
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 986 Bytes
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 986 Bytes
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
# devpi docker image
FROM ubuntu:latest
MAINTAINER https://github.com/florianwilhelm/
ARG DEVPI_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 devpi user and group
RUN adduser --uid 1000 --home /data --disabled-password --disabled-login --system --group devpi
# entrypoint is written in bash
RUN apt-get update && apt-get install -y build-essential python3-pip
# create a virtual env in $VIRTUAL_ENV, ensure it respects pip version
RUN pip3 install virtualenv \
&& virtualenv $VIRTUAL_ENV \
&& $VIRTUAL_ENV/bin/pip3 install pip
ENV PATH $VIRTUAL_ENV/bin:$PATH
RUN if [ -n "${DEVPI_VERSION}" ]; then pip3 install "devpi==${DEVPI_VERSION}"; else pip3 install devpi; fi
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 3141
VOLUME /data
USER devpi
ENV HOME /data
WORKDIR /data
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["devpi"]