Skip to content

Commit

Permalink
chore: remove unnecessary apt-get clean in Dockerfile (DIYgod#5958)
Browse files Browse the repository at this point in the history
This image is built from the official Debian image as upstream, so there
is no need to do apt-get clean manually.

Ref:
- 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.
  • Loading branch information
PeterDaveHello authored Oct 21, 2020
1 parent 5266046 commit f3fcb80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1;

RUN ln -sf /bin/bash /bin/sh

RUN apt-get update && apt-get install -yq libgconf-2-4 apt-transport-https git dumb-init python make g++ build-essential --no-install-recommends && apt-get clean \
RUN apt-get update && apt-get install -yq libgconf-2-4 apt-transport-https git dumb-init python make g++ build-essential --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
Expand All @@ -29,7 +29,6 @@ RUN if [ "$PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" = 0 ]; then \
&& apt-get update \
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \
--no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get purge --auto-remove -y wget\
&& rm -rf /src/*.deb \
Expand Down

0 comments on commit f3fcb80

Please sign in to comment.