From a12e14b39ea45df99a25f53e219e76c5af89ef8f Mon Sep 17 00:00:00 2001 From: Rodrigo Ferreira Date: Fri, 6 Sep 2024 12:02:55 -0300 Subject: [PATCH] Updates Dockerfile to fix file permissions during build --- tools/npm/garaga_rs/Dockerfile | 2 +- tools/npm/garaga_rs/fix-chown.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 tools/npm/garaga_rs/fix-chown.sh diff --git a/tools/npm/garaga_rs/Dockerfile b/tools/npm/garaga_rs/Dockerfile index a34a3c01..adc13de3 100644 --- a/tools/npm/garaga_rs/Dockerfile +++ b/tools/npm/garaga_rs/Dockerfile @@ -15,4 +15,4 @@ ENV PATH="$HOME/n/bin/:$PATH" WORKDIR /garaga/tools/npm/garaga_rs -CMD npm ci && npm run build && npm pack +CMD npm ci && npm run build && npm pack && ./fix-chown.sh diff --git a/tools/npm/garaga_rs/fix-chown.sh b/tools/npm/garaga_rs/fix-chown.sh new file mode 100755 index 00000000..4a2f4d11 --- /dev/null +++ b/tools/npm/garaga_rs/fix-chown.sh @@ -0,0 +1,5 @@ +#!/bin/sh +FOLDER="$(dirname "$0")" +UID=$(stat -c "%u" "$FOLDER") +GID=$(stat -c "%g" "$FOLDER") +chown -R "$UID:$GID" "$FOLDER"