scripts/container.sh: run docker with user's UID and GID

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2023-04-20 09:28:49 +02:00
parent b0d32d78af
commit 03b5163b81

View File

@ -16,7 +16,7 @@ then
elif [ "$(command -v docker)" ] elif [ "$(command -v docker)" ]
then then
docker build -t "${TAG}" contrib/docker docker build -t "${TAG}" contrib/docker
docker run -it --rm --volume="$(pwd):/gluon" "${TAG}" docker run -it --rm --user "$(id -u):$(id -g)" --volume="$(pwd):/gluon" "${TAG}"
else else
1>&2 echo "Please install either podman or docker. Exiting" >/dev/null 1>&2 echo "Please install either podman or docker. Exiting" >/dev/null
exit 1 exit 1