-
Notifications
You must be signed in to change notification settings - Fork 350
Expand file tree
/
Copy pathdocker-run.sh
More file actions
executable file
·47 lines (39 loc) · 1.38 KB
/
docker-run.sh
File metadata and controls
executable file
·47 lines (39 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation. All rights reserved.
# Runs a given script in the docker container you can generate from the
# docker_build directory.
# Example:
# To build sof for tigerlake:
# ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh tgl
# To build topology:
# ./scripts/docker-run.sh ./scripts/build-tools.sh
# set -x
set -e
SOF_TOP="$(cd "$(dirname "$0")"/.. && /bin/pwd)"
# Log container versions
for rep in sof thesofproject/sof; do
docker images --digests "$rep"
done
if tty --quiet; then
SOF_DOCKER_RUN="$SOF_DOCKER_RUN --tty"
fi
# The --user option below can cause the command to run as a user who
# does not exist in the container. So far so good but in case something
# ever goes wrong try replacing --user with the newer
# scripts/sudo-cwd.sh script.
test "$(id -u)" = 1000 ||
>&2 printf "Warning: this script should be run as user ID 1000 to match the container's account\n"
set -x
docker run -i -v "${SOF_TOP}":/home/sof/work/sof.git \
-v "${SOF_TOP}":/home/sof/work/sof-bind-mount-DO-NOT-DELETE \
--env CMAKE_BUILD_TYPE \
--env PRIVATE_KEY_OPTION \
--env USE_XARGS \
--env NO_PROCESSORS \
--env VERBOSE \
--env http_proxy="$http_proxy" \
--env https_proxy="$https_proxy" \
--env SOF_WORKSPACE="/home/sof/work" \
$SOF_DOCKER_RUN \
thesofproject/sof:20250505_ubuntu22.04 ./scripts/sudo-cwd.sh "$@"