From 8e97edde1d89bf192b08e19443012a1e655c1319 Mon Sep 17 00:00:00 2001 From: Kevin Dorner Date: Wed, 18 May 2022 03:18:54 +0200 Subject: [PATCH] Add user to Containerfile + configure user --- Containerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index b873a6d..afe660f 100644 --- a/Containerfile +++ b/Containerfile @@ -1,6 +1,15 @@ FROM docker.io/alpine:edge + RUN apk add --no-cache buildah +RUN adduser build; \ + echo "build:100000:65536" | tee /etc/subuid > /etc/subgid; \ + mkdir -p /home/build/.local/share/containers; \ + chown -R build:build /home/build -# Use chroot isolation to avoid unshare call +# Use chroot isolation ENV BUILDAH_ISOLATION=chroot + +USER build +WORKDIR /home/build +