Skip to content

Commit

Permalink
scripts/container.sh: fix rootless Podman on systems with SELinux
Browse files Browse the repository at this point in the history
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 freifunk-gluon#3199

(cherry picked from commit 9ccd353)
Signed-off-by: Tom Herbers <[email protected]>
  • Loading branch information
neocturne authored and herbetom committed Mar 16, 2024
1 parent db38f9a commit aefb3bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aefb3bf

Please sign in to comment.