From 358f5793350ef0b3cec472f880de34646afc371f Mon Sep 17 00:00:00 2001 From: Victor Campos Date: Mon, 11 May 2026 14:23:21 +0100 Subject: [PATCH] Run Docker container as the host user The `docker run` command that builds the ACLE locally now runs as the host user. This way, the output files are owned by that same user instead of by root. --- build_with_docker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_with_docker.sh b/build_with_docker.sh index 2a0fc647..713b7ca2 100755 --- a/build_with_docker.sh +++ b/build_with_docker.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates +# SPDX-FileCopyrightText: Copyright 2021-2026 Arm Limited and/or its affiliates # SPDX-License-Identifier: Apache-2.0 set -x @@ -8,5 +8,5 @@ IMAGE_NAME=acle_build # Build the image. docker build -t $IMAGE_NAME tools/docker # Run the image, mounting the current folder into the /src folder of -# the docker image. -docker run --rm --mount type=bind,source="$(pwd)",target=/src $IMAGE_NAME +# the docker image. Run as the host user so that the output files are owned by them. +docker run --rm -u $(id -u):$(id -g) --mount type=bind,source="$(pwd)",target=/src $IMAGE_NAME