Remove additional apt-get clean in Dockerfile

Reference:

- https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get

> Official Debian and Ubuntu images automatically run `apt-get clean`,
> so explicit invocation is not required.
This commit is contained in:
Peter Dave Hello 2021-06-03 22:00:29 +08:00
parent 28595ed1cf
commit b7befcd680

View file

@ -27,7 +27,6 @@ ADD . kvazaar
# data in the image. # data in the image.
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y $REQUIRED_PACKAGES \ && apt-get install -y $REQUIRED_PACKAGES \
&& apt-get clean \
&& cd kvazaar \ && cd kvazaar \
&& ./autogen.sh \ && ./autogen.sh \
&& ./configure --disable-shared \ && ./configure --disable-shared \
@ -35,7 +34,6 @@ RUN apt-get update \
&& make install \ && make install \
&& AUTOINSTALLED_PACKAGES=`apt-mark showauto` \ && AUTOINSTALLED_PACKAGES=`apt-mark showauto` \
&& apt-get remove --purge --force-yes -y $REQUIRED_PACKAGES $AUTOINSTALLED_PACKAGES \ && apt-get remove --purge --force-yes -y $REQUIRED_PACKAGES $AUTOINSTALLED_PACKAGES \
&& apt-get clean autoclean \
&& apt-get autoremove -y \ && apt-get autoremove -y \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ && rm -rf /var/lib/{apt,dpkg,cache,log}/