From 23458de5884e12f95c4a3c01b7c706f12fd54a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Krawaczy=C5=84ski?= Date: Fri, 15 Oct 2021 21:18:31 +0200 Subject: [PATCH 1/2] One RUN less Align apk add commands between images. --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 12fc89102..630e0a582 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,7 @@ FROM alpine:3.14 AS compiler RUN apk update --quiet -RUN apk add curl -RUN apk add build-base +RUN apk add -q --no-cache curl build-base RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y From 4c50deb4b786a2144bc1440ca3209833e64ba286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Krawaczy=C5=84ski?= Date: Sat, 16 Oct 2021 11:37:01 +0200 Subject: [PATCH 2/2] 2 RUNs less. --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 630e0a582..49d44f031 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # Compile FROM alpine:3.14 AS compiler -RUN apk update --quiet -RUN apk add -q --no-cache curl build-base +RUN apk update --quiet \ + && apk add -q --no-cache curl build-base RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y @@ -39,7 +39,8 @@ ENV HOME /home/${USER} ENV MEILI_HTTP_ADDR 0.0.0.0:7700 # download runtime deps as root and create ${USER} -RUN apk add -q --no-cache libgcc tini curl \ +RUN apk update --quiet \ + && apk add -q --no-cache libgcc tini curl \ && adduser -D ${USER} WORKDIR ${HOME} USER ${USER}