Skip to content

Commit 8821c49

Browse files
authored
Rollup merge of rust-lang#74161 - tblah:riscv64gc-dockerfile-improvment, r=Mark-Simulacrum
Fix disabled dockerfiles When the dockerfiles were moved into the host-x86_64 directory, paths for COPY commands were updated with the new host-x86_64/ prefix. This suggested that the intended context was src/ci/docker. However, the context for disabled docker images was src/ci/docker/host-x86_64. This broke the new paths and prevented src/ci/docker/scripts from being included in the context at all. This commit corrects this context allowing docker to find the files it needs for COPY commands. Also includes a quick fix to riscv recommended by @bjorn3
2 parents 4476eb3 + d9fec59 commit 8821c49

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ci/docker/host-x86_64/disabled/riscv64gc-linux/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ RUN curl https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.16.tar.xz | tar
4040
cp linux.config linux-5.6.16/.config && \
4141
cd /build/linux-5.6.16 && \
4242
make olddefconfig && \
43-
make -j$(nproc) vmlinux
44-
RUN cp linux-5.6.16/vmlinux /tmp
45-
RUN rm -rf linux-5.6.16
43+
make -j$(nproc) vmlinux && \
44+
cp vmlinux /tmp && \
45+
rm -rf linux-5.6.16
4646

4747
# Compile an instance of busybox as this provides a lightweight system and init
4848
# binary which we will boot into. Only trick here is configuring busybox to

src/ci/docker/run.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then
119119
exit 1
120120
fi
121121
# Transform changes the context of disabled Dockerfiles to match the enabled ones
122-
tar --transform 's#^./disabled/#./#' -C $docker_dir -c . | docker \
122+
tar --transform 's#disabled/#./#' -C $script_dir -c . | docker \
123123
build \
124124
--rm \
125125
-t rust-ci \
126-
-f "$image/Dockerfile" \
126+
-f "host-$(uname -m)/$image/Dockerfile" \
127127
-
128128
else
129129
echo Invalid image: $image

0 commit comments

Comments
 (0)