From 9ccd353e469da2dd8d57b7ff839e8fe308d3dfe1 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 25 Feb 2024 15:44:17 +0100
Subject: [PATCH] scripts/container.sh: fix rootless Podman on systems with
 SELinux

We need to pass the `z` option with the volume mount so it gets labeled
correctly and access is possible on SELinux-enabled systems. On systems
without SELinux, the flag is a no-op.

Fixes #3199
---
 scripts/container.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/container.sh b/scripts/container.sh
index 3c7b30b89..9d00db73b 100755
--- a/scripts/container.sh
+++ b/scripts/container.sh
@@ -12,7 +12,7 @@ TAG="gluon:${BRANCH:-latest}"
 if [ "$(command -v podman)" ]
 then
 	podman build -t "${TAG}" contrib/docker
-	podman run -it --rm -u "$(id -u):$(id -g)" --userns=keep-id --volume="$(pwd):/gluon" "${TAG}"
+	podman run -it --rm -u "$(id -u):$(id -g)" --userns=keep-id --volume="$(pwd):/gluon:z" "${TAG}"
 elif [ "$(command -v docker)" ]
 then
 	docker build -t "${TAG}" contrib/docker
-- 
GitLab