From aaab3a0124e0d928703941e83d707128002352c2 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sat, 16 Mar 2024 14:56:03 +0100 Subject: [PATCH] Fix Dockerimage on Selinux Hosts (#1) This is just the same z like in volume mounts. On selinux it otherwise causes that commands fail with permission denied. Tested with podman on fedora which has selinux enabled. Signed-off-by: Marcel --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2954f852..62175bd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,9 @@ FROM --platform=${BUILDPLATFORM} base AS build WORKDIR /src ARG TARGETOS ARG TARGETARCH -RUN --mount=target=. \ - --mount=type=cache,target=/root/.cache/go-build \ - --mount=type=cache,target=/go/pkg/mod \ +RUN --mount=target=.,z \ + --mount=type=cache,target=/root/.cache/go-build,z \ + --mount=type=cache,target=/go/pkg/mod,z \ USERARCH=`go env GOARCH` \ GOARCH="$TARGETARCH" \ GOOS="linux" \