Skip to content

Commit b2020a7

Browse files
committed
update Dockerfile to py3.6; reorg like WB
* Upgrade Dockerfile image base to python v3.6. * Install gosu via apt-get. gosu v1.10 started being shipped with debian as of the `stretch` release. Install from apt-get instead of `curl`-ing it from the github release page. * Pin pip version to 18.1 to avoid dep conflicts. * Based off the following WB commits: * CenterForOpenScience/waterbutler@d03a84c * CenterForOpenScience/waterbutler@b179eb8
1 parent 822245c commit b2020a7

File tree

1 file changed

+12
-29
lines changed

1 file changed

+12
-29
lines changed

Dockerfile

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.5-slim-buster
1+
FROM python:3.6-slim-buster
22

33
# ensure unoconv can locate the uno library
44
ENV PYTHONPATH /usr/lib/python3/dist-packages
@@ -25,49 +25,32 @@ RUN usermod -d /home www-data \
2525
libxml2-dev \
2626
libxslt1-dev \
2727
zlib1g-dev \
28+
gnupg2 \
2829
# convert .step to jsc3d-compatible format
2930
freecad \
3031
# pspp dependencies
3132
pspp \
3233
# unoconv dependencies
3334
libreoffice \
34-
# gosu dependencies
35-
curl \
36-
gnupg2 \
37-
# gosu
38-
&& export GOSU_VERSION='1.10' \
39-
&& mkdir ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \
40-
&& for server in hkp://ipv4.pool.sks-keyservers.net:80 \
41-
hkp://ha.pool.sks-keyservers.net:80 \
42-
hkp://pgp.mit.edu:80 \
43-
hkp://keyserver.pgp.com:80 \
44-
; do \
45-
gpg --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && break || echo "Trying new server..." \
46-
; done \
47-
&& curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
48-
&& curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
49-
&& gpg --verify /usr/local/bin/gosu.asc \
50-
&& rm /usr/local/bin/gosu.asc \
51-
&& chmod +x /usr/local/bin/gosu \
52-
# /gosu
35+
# grab gosu for easy step-down from root
36+
gosu \
5337
&& apt-get clean \
5438
&& apt-get autoremove -y \
55-
curl \
56-
gnupg2 \
57-
&& rm -rf /var/lib/apt/lists/* \
58-
&& pip install -U pip \
59-
&& pip install setuptools==37.0.0 \
60-
&& mkdir -p /code \
61-
&& pip install unoconv==0.8.2
39+
&& rm -rf /var/lib/apt/lists/*
6240

41+
RUN mkdir -p /code
6342
WORKDIR /code
6443

65-
COPY ./requirements.txt ./
44+
RUN pip install -U pip==18.1
45+
RUN pip install setuptools==37.0.0
46+
RUN pip install unoconv==0.8.2
47+
48+
COPY ./requirements.txt /code/
6649

6750
RUN pip install --no-cache-dir -r ./requirements.txt
6851

6952
# Copy the rest of the code over
70-
COPY ./ ./
53+
COPY ./ /code/
7154

7255
ARG GIT_COMMIT=
7356
ENV GIT_COMMIT ${GIT_COMMIT}

0 commit comments

Comments
 (0)