From cec124a162595be56fea1fd57f36c4b4437fcc8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Tue, 19 Mar 2019 14:27:02 +0100 Subject: [PATCH] exclude first ADD since its most often the base #362 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- tests/4_container_images.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/4_container_images.sh b/tests/4_container_images.sh index f9211a8..0406a00 100644 --- a/tests/4_container_images.sh +++ b/tests/4_container_images.sh @@ -224,8 +224,8 @@ check_4_9() { fail=0 add_images="" for img in $images; do - docker history "$img" 2> /dev/null | grep 'ADD' >/dev/null 2>&1 - if [ $? -eq 0 ]; then + if docker history --format "{{ .CreatedBy }}" --no-trunc "$img" | sed '$d' |\ + grep -q 'ADD'; then if [ $fail -eq 0 ]; then fail=1 info "$check_4_9"