Dockerfile - clean up more after build

Rust isn't needed after building. Various other packages and caches
can be deleted.

setuptools needed to avoid error like:

     ModuleNotFoundError: No module named 'pkg_resources'
This commit is contained in:
Nick Stokoe
2021-02-19 14:47:38 +00:00
parent 225f3ed4c2
commit f85b032bb7

View File

@@ -30,8 +30,8 @@ RUN \
libffi-dev \ libffi-dev \
openssl-dev \ openssl-dev \
python3-dev \ python3-dev \
py3-setuptools \
py3-pip \ py3-pip \
py3-wheel \
libcdio \ libcdio \
libcaca \ libcaca \
libvpx \ libvpx \
@@ -66,7 +66,19 @@ RUN \
Mopidy-SoundCloud \ Mopidy-SoundCloud \
&& echo "* Cleaning up" \ && echo "* Cleaning up" \
&& rm -rf /var/cache/apk/* \ && rm -rf /var/cache/apk/* \
&& rm -rf /tmp/* && rm -rf /root/.cache /root/.cargo \
&& rm -rf /tmp/* \
&& apk del \
build-base \
rust \
cargo \
libxml2-dev \
libxslt-dev \
libffi-dev \
openssl-dev \
python3-dev \
py3-pip
# Do this in a separate layer, because building the last is slooow # Do this in a separate layer, because building the last is slooow
# This allows us to alter these parameters without rebuilding the last. # This allows us to alter these parameters without rebuilding the last.