Skip to content
Snippets Groups Projects
Unverified Commit 9ccd353e authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

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
parent d8b7d4b3
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ TAG="gluon:${BRANCH:-latest}" ...@@ -12,7 +12,7 @@ TAG="gluon:${BRANCH:-latest}"
if [ "$(command -v podman)" ] if [ "$(command -v podman)" ]
then then
podman build -t "${TAG}" contrib/docker 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)" ] elif [ "$(command -v docker)" ]
then then
docker build -t "${TAG}" contrib/docker docker build -t "${TAG}" contrib/docker
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment