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