From 15485dc0add7ec727943046956fd419f33a152da Mon Sep 17 00:00:00 2001 From: Jan Kiesewetter Date: Fri, 7 Feb 2020 09:50:54 +0100 Subject: [PATCH] Format apt-get commands according to best practices See: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get Resolves: 1004 --- docker/Dockerfile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 5c5756525..61f287cd6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,20 +6,23 @@ ENV \ BACKSTOPJS_VERSION=$BACKSTOPJS_VERSION # Base packages -RUN apt-get update && \ - apt-get install -y git sudo software-properties-common +RUN apt-get update && apt-get install -y \ + git \ + sudo \ + software-properties-common \ + && rm -rf /var/lib/apt/lists/* RUN sudo npm install -g --unsafe-perm=true --allow-root backstopjs@${BACKSTOPJS_VERSION} RUN wget https://dl-ssl.google.com/linux/linux_signing_key.pub && sudo apt-key add linux_signing_key.pub RUN sudo add-apt-repository "deb http://dl.google.com/linux/chrome/deb/ stable main" -RUN apt-get -y update && apt-get -y install google-chrome-stable +RUN apt-get update && apt-get install -y \ + google-chrome-stable \ + #firefox-esr \ + && rm -rf /var/lib/apt/lists/* -# RUN apt-get install -y firefox-esr - -RUN apt-get -qqy update \ - && apt-get -qqy --no-install-recommends install \ +RUN apt-get update && apt-get install -y --no-install-recommends \ libfontconfig \ libfreetype6 \ xfonts-cyrillic \ @@ -27,8 +30,7 @@ RUN apt-get -qqy update \ fonts-liberation \ fonts-ipafont-gothic \ fonts-wqy-zenhei \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get -qyy clean + && rm -rf /var/lib/apt/lists/* WORKDIR /src