Made builder root again
All checks were successful
continuous-integration/drone the build was successful

This commit is contained in:
Jef Roosens 2021-04-24 09:47:28 +02:00
parent 0abfaca967
commit 3bdf79e824
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
2 changed files with 15 additions and 18 deletions

View file

@ -2,7 +2,7 @@
# Our entire toolchain runs in alpine
FROM alpine:3.13.5 AS builder
ENV PATH "$PATH:/app/.cargo/bin"
ENV PATH "$PATH:/root/.cargo/bin"
# Needed for proper compiling of openssl-dev
ENV RUSTFLAGS "-C target-feature=-crt-static"
@ -19,13 +19,7 @@ RUN addgroup -S builder && \
openssl-dev \
postgresql-dev
# Switch to the non-root user
USER builder
WORKDIR /app
# Install rustup in the new user's home
# Create mountpoints for volumes with correct permissions
RUN { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly; } && \
rustup target add x86_64-unknown-linux-musl --toolchain nightly && \
mkdir -p .cargo/registry target
rustup target add x86_64-unknown-linux-musl --toolchain nightly