This repository was archived by the owner on Aug 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,9 @@ set -Eeuo pipefail
66docker image history --no-trunc --format ' {{ .CreatedBy }}' " $@ " \
77 | tac \
88 | sed -r ' s!^/bin/sh[[:space:]]+-c[[:space:]]+(#[(]nop[)][[:space:]]+)?!!' \
9- | awk '
10- # ignore the first ADD of the base image (base image changes unnecessarily break our diffs)
11- NR == 1 && $1 == "ADD" && $4 == "/" { next }
12- # TODO consider instead just removing the checksum in $3
13-
14- # ignore obviously "centos" LABEL instructions (include a timestamp, so base image changes unnecessarily break our diffs)
15- $1 == "LABEL" && / org.opencontainers.image.vendor=CentOS | org.label-schema.vendor=CentOS / { next }
16-
17- # just ignore the default CentOS CMD value (not relevant to our needs)
18- $0 == "CMD [\"/bin/bash\"]" { next }
9+ | gawk '
10+ # munge the checksum of the first ADD of the base image (base image changes unnecessarily break our diffs)
11+ NR == 1 && $1 == "ADD" && $4 == "/" { $2 = "-" }
1912
2013 # ignore the contents of certain copies (notoriously unreliable hashes because they often contain timestamps)
2114 $1 == "COPY" && ($4 == "/usr/share/elasticsearch" || $4 ~ /^\/opt\/jdk-/) { gsub(/:[0-9a-f]{64}$/, ":filtered-content-hash", $2) }
You can’t perform that action at this time.
0 commit comments