Skip to content

Commit d0ce87b

Browse files
committed
Auto merge of #3427 - Arnavion:unique-docker-image-name, r=JohnTitor
Use a unique name for the Docker image used by CI. This allows testing multiple targets in parallel on the same host machine.
2 parents f2c1788 + 90bd662 commit d0ce87b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ci/run-docker.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ run() {
2828
echo "Building docker container for target ${1}"
2929

3030
# use -f so we can use ci/ as build context
31-
docker build -t libc -f "ci/docker/${1}/Dockerfile" ci/
31+
docker build -t "libc-${1}" -f "ci/docker/${1}/Dockerfile" ci/
3232
mkdir -p target
3333
if [ -w /dev/kvm ]; then
3434
kvm="--volume /dev/kvm:/dev/kvm"
@@ -50,15 +50,15 @@ run() {
5050
$kvm \
5151
--init \
5252
--workdir /checkout \
53-
libc \
53+
"libc-${1}" \
5454
sh -c "HOME=/tmp PATH=\$PATH:/rust/bin exec ci/run.sh ${1}"
5555
}
5656

5757
build_switch() {
5858
echo "Building docker container for target switch"
5959

6060
# use -f so we can use ci/ as build context
61-
docker build -t libc -f "ci/docker/switch/Dockerfile" ci/
61+
docker build -t libc-switch -f "ci/docker/switch/Dockerfile" ci/
6262
mkdir -p target
6363
if [ -w /dev/kvm ]; then
6464
kvm="--volume /dev/kvm:/dev/kvm"
@@ -82,7 +82,7 @@ build_switch() {
8282
$kvm \
8383
--init \
8484
--workdir /checkout \
85-
libc \
85+
libc-switch \
8686
sh -c "HOME=/tmp RUSTUP_HOME=/tmp PATH=\$PATH:/rust/bin rustup default nightly \
8787
&& rustup component add rust-src --target ci/switch.json \
8888
&& cargo build -Z build-std=core,alloc --target ci/switch.json"

0 commit comments

Comments
 (0)