Skip to content

Commit aef51a0

Browse files
committed
Ignore files copied from previous stage when generating hash.
1 parent 3a687e7 commit aef51a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ci/docker/run.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
5050
# Look for all source files involves in the COPY command
5151
copied_files=/tmp/.docker-copied-files.txt
5252
rm -f "$copied_files"
53-
for i in $(sed -n -e 's/^COPY \(.*\) .*$/\1/p' "$docker_dir/$image/Dockerfile"); do
53+
for i in $(sed -n -e '/^COPY --from=/! s/^COPY \(.*\) .*$/\1/p' \
54+
"$docker_dir/$image/Dockerfile"); do
5455
# List the file names
5556
find "$script_dir/$i" -type f >> $copied_files
5657
done

0 commit comments

Comments
 (0)