Skip to content

Commit 50e1ea0

Browse files
authored
Run Docker container as the host user (#433)
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.
1 parent 5f6183b commit 50e1ea0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

build_with_docker.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env bash
22

3-
# SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates <[email protected]>
3+
# SPDX-FileCopyrightText: Copyright 2021-2026 Arm Limited and/or its affiliates <[email protected]>
44
# SPDX-License-Identifier: Apache-2.0
55

66
set -x
77
IMAGE_NAME=acle_build
88
# Build the image.
99
docker build -t $IMAGE_NAME tools/docker
1010
# Run the image, mounting the current folder into the /src folder of
11-
# the docker image.
12-
docker run --rm --mount type=bind,source="$(pwd)",target=/src $IMAGE_NAME
11+
# the docker image. Run as the host user so that the output files are owned by them.
12+
docker run --rm -u $(id -u):$(id -g) --mount type=bind,source="$(pwd)",target=/src $IMAGE_NAME

0 commit comments

Comments
 (0)