From c3feaacfd8cceec3f21e20a6d6e28107299c7de6 Mon Sep 17 00:00:00 2001 From: brandtkeller Date: Thu, 3 Feb 2022 12:47:12 -0800 Subject: [PATCH] Fix: podman rootless user namespace volume mount --- container-run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/container-run.sh b/container-run.sh index b5cd773e8..c41b92b44 100755 --- a/container-run.sh +++ b/container-run.sh @@ -1,11 +1,16 @@ #!/bin/bash VERSION=$(grep -oE "\"version\": \"(\w*.\w*.\w*.\w*.\w*.)" package.json | cut -d\" -f4) +VOLUME_USERSPACE="" CONTAINER_ENGINE=$1 if [ -z $CONTAINER_ENGINE ]; then CONTAINER_ENGINE=docker +elif [ $CONTAINER_ENGINE = "podman" ]; then + # rootless podman will require mounting the volume as its uid/gid internally for proper permissions + VOLUME_USERSPACE=":U" fi echo using $CONTAINER_ENGINE container engine... +echo Server now running at http://127.0.0.1:1880/ -$CONTAINER_ENGINE run -p 1880:1880 -v "$(pwd)"/data:/home/appuser/.node-red sparkle-guide:$VERSION & \ No newline at end of file +$CONTAINER_ENGINE run -d -p 1880:1880 -v "$(pwd)"/data:/home/appuser/.node-red$VOLUME_USERSPACE sparkle-guide:$VERSION \ No newline at end of file