Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

Commit 070d5cb

Browse files
authored
chore(Dockerfile): cleanup after installation a bit more than before and keep copyright / license files (#96)
Brings the Dockerfile in line with Controller, makes it easier to move to Python 3
1 parent 1c932fb commit 070d5cb

1 file changed

Lines changed: 30 additions & 22 deletions

File tree

rootfs/Dockerfile

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
11
FROM quay.io/deis/base:v0.3.4
22

3-
RUN apt-get update \
4-
&& apt-get install -y \
5-
gcc \
6-
libffi6 \
7-
libffi-dev \
8-
libssl1.0.0 \
9-
libssl-dev \
10-
musl \
11-
musl-dev \
12-
python \
13-
python-dev \
14-
--no-install-recommends \
15-
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python - pip==8.1.2 \
16-
&& pip install --disable-pip-version-check --no-cache-dir docker-py==1.10.3 \
17-
&& apt-get remove -y --auto-remove --purge \
18-
gcc \
19-
libffi-dev \
20-
libssl-dev \
21-
musl-dev \
22-
python-dev \
23-
&& apt-get clean \
24-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc
3+
RUN buildDeps='gcc git libffi-dev libssl-dev musl-dev python-dev python-pip python-wheel python-setuptools'; \
4+
apt-get update && \
5+
apt-get install -y --no-install-recommends \
6+
$buildDeps \
7+
libffi6 \
8+
libssl1.0.0 \
9+
musl \
10+
python && \
11+
pip install --disable-pip-version-check --no-cache-dir docker-py==1.10.3 && \
12+
# cleanup
13+
apt-get purge -y --auto-remove $buildDeps && \
14+
apt-get autoremove -y && \
15+
apt-get clean -y && \
16+
# package up license files if any by appending to existing tar
17+
COPYRIGHT_TAR='/usr/share/copyrights.tar'; \
18+
gunzip $COPYRIGHT_TAR.gz; tar -rf $COPYRIGHT_TAR /usr/share/doc/*/copyright; gzip $COPYRIGHT_TAR && \
19+
rm -rf \
20+
/usr/share/doc \
21+
/usr/share/man \
22+
/usr/share/info \
23+
/usr/share/locale \
24+
/var/lib/apt/lists/* \
25+
/var/log/* \
26+
/var/cache/debconf/* \
27+
/etc/systemd \
28+
/lib/lsb \
29+
/lib/udev \
30+
/usr/lib/x86_64-linux-gnu/gconv/IBM* \
31+
/usr/lib/x86_64-linux-gnu/gconv/EBC* && \
32+
bash -c "mkdir -p /usr/share/man/man{1..8}"
2533

2634
ADD https://storage.googleapis.com/object-storage-cli/bb8e054/objstorage-bb8e054-linux-amd64 /bin/objstorage
2735
RUN chmod +x /bin/objstorage

0 commit comments

Comments
 (0)