Skip to content

Commit

Permalink
Ignore files copied from previous stage when generating hash.
Browse files Browse the repository at this point in the history
  • Loading branch information
hkratz committed Nov 1, 2021
1 parent 3a687e7 commit aef51a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
# Look for all source files involves in the COPY command
copied_files=/tmp/.docker-copied-files.txt
rm -f "$copied_files"
for i in $(sed -n -e 's/^COPY \(.*\) .*$/\1/p' "$docker_dir/$image/Dockerfile"); do
for i in $(sed -n -e '/^COPY --from=/! s/^COPY \(.*\) .*$/\1/p' \
"$docker_dir/$image/Dockerfile"); do
# List the file names
find "$script_dir/$i" -type f >> $copied_files
done
Expand Down

0 comments on commit aef51a0

Please sign in to comment.