Merge pull request #1817 from nfsec/patch-1

Improve RUNs in Dockerfile
This commit is contained in:
Clémentine Urquizar 2021-10-19 00:00:22 +02:00 committed by GitHub
commit e7e4ccf74f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -1,9 +1,8 @@
# Compile
FROM alpine:3.14 AS compiler
RUN apk update --quiet
RUN apk add curl
RUN apk add 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
@ -40,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}