summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-07-14 12:40:46 +0200
committerFelix Morgner <felix.morgner@ost.ch>2025-07-14 12:41:07 +0200
commitc23931607c1d8d937c65f3cf812dd5e8cde7084b (patch)
treed7d562b05a7331175f1e9809d63696f5d8221fe9
parentc832095038c32b21cffcf210052a1841c8efe728 (diff)
downloadteachos-toolchain-c23931607c1d8d937c65f3cf812dd5e8cde7084b.tar.xz
teachos-toolchain-c23931607c1d8d937c65f3cf812dd5e8cde7084b.zip
image: add non-root user and copy toolchain first
-rw-r--r--Containerfile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Containerfile b/Containerfile
index d988874..31734b1 100644
--- a/Containerfile
+++ b/Containerfile
@@ -18,6 +18,12 @@ FROM docker.io/archlinux:latest
ARG EMULATOR=x86
+RUN useradd -m dev
+
+COPY --from=build /opt/toolchain /opt/toolchain
+
+ENV PATH=/opt/toolchain/bin:$PATH
+
RUN pacman --noconfirm -Syu && \
pacman --noconfirm --needed -S \
cmake \
@@ -39,6 +45,3 @@ RUN pacman --noconfirm -Syu && \
xxhash \
zlib
-COPY --from=build /opt/toolchain /opt/toolchain
-
-ENV PATH=/opt/toolchain/bin:$PATH