From f851dfd52490fff55788acecece59bdd3ea33a42 Mon Sep 17 00:00:00 2001 From: surtur Date: Tue, 17 Mar 2020 02:14:00 +0100 Subject: [PATCH] major updates to Dockerfile - moving away from `pacman -Syu` to `-Sy` (no more updating of the whole system) greatly reduces the resulting image size and thus also the build time - explicitly target 'latest' base image release - move the whole build logic under a single `RUN` --- Dockerfile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6ba536d..f7d4f48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM archlinux/base +FROM archlinux/base:latest ENV CHROMEDRIVER_VERSION="80.0.3987.106" @@ -14,16 +14,13 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ ADD https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip /tmp/chromedriver.zip WORKDIR /tmp - -RUN pacman -Syu --noconfirm --needed python python-pip chromium - -RUN pip install robotframework robotframework-seleniumlibrary \ +RUN pacman -Sy --noconfirm --needed python python-pip chromium \ + && pip install robotframework robotframework-seleniumlibrary \ && bsdtar xfv /tmp/chromedriver.zip && rm -v /tmp/chromedriver.zip \ && chmod -v +x /tmp/chromedriver \ && mkdir -pv /usr/local/bin \ - && mv -v /tmp/chromedriver /usr/local/bin/ - -RUN pacman --noconfirm -Runs \ + && mv -v /tmp/chromedriver /usr/local/bin/ \ + && pacman --noconfirm -Runs \ gzip less sysfsutils which \ && rm -rv /usr/share/info/* \ && rm -rv /usr/share/man/* \ @@ -37,5 +34,4 @@ RUN pacman --noconfirm -Runs \ && pacman --noconfirm -Runs tar gawk || true \ && pacman -Scc \ && rm -rv /var/cache/pacman/* /var/lib/pacman/sync/* - WORKDIR /