Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve RUNs in Dockerfile #1817

Merged
merged 2 commits into from
Oct 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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}
Expand Down