fix docker permissions

This commit is contained in:
dan_s
2026-02-23 08:27:19 -06:00
parent aca38e6636
commit 70d97d887b
2 changed files with 7 additions and 1 deletions

View File

@@ -41,3 +41,9 @@ cd ..
echo "Release package created: hush-${VERSION}-linux64.zip"
ls -lh "hush-${VERSION}-linux64.zip"
# Fix ownership of all files created by root so host user can access them
if [ -n "${HOST_UID:-}" ] && [ -n "${HOST_GID:-}" ]; then
echo "Fixing file ownership to ${HOST_UID}:${HOST_GID}..."
chown -R "${HOST_UID}:${HOST_GID}" /hush3
fi

View File

@@ -46,7 +46,7 @@ if [[ "${1:-}" == "--linux-release" ]]; then
shift
echo "Building Linux release inside Ubuntu 20.04 Docker container..."
sudo docker build -t hush-builder -f Dockerfile.build .
sudo docker run --rm --user "$(id -u):$(id -g)" -v "$SCRIPT_DIR:/hush3" hush-builder "$@"
sudo docker run --rm -e HOST_UID=$(id -u) -e HOST_GID=$(id -g) -v "$SCRIPT_DIR:/hush3" hush-builder "$@"
echo "Docker build complete. Release is in release-linux/"
exit $?
fi