From 1bef8f14b9dbd6cbdbd0023a45f32f8b42b7c72c Mon Sep 17 00:00:00 2001 From: Konstantin Vasin Date: Thu, 3 Nov 2022 17:31:31 +0300 Subject: [PATCH] Fix removing of old docker container Signed-off-by: Konstantin Vasin --- scripts/collect_docker_version_files.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/collect_docker_version_files.sh b/scripts/collect_docker_version_files.sh index 73f0a9b53198..50259642915b 100755 --- a/scripts/collect_docker_version_files.sh +++ b/scripts/collect_docker_version_files.sh @@ -15,8 +15,8 @@ mkdir -p $TARGET_VERSIONS_PATH export DOCKER_CLI_EXPERIMENTAL=enabled # Remove the old docker container if existing -if docker container inspect $DOCKER_IMAGE > /dev/null 2>&1; then - docker container rm $DOCKER_IMAGE > /dev/null +if docker container inspect $DOCKER_CONTAINER > /dev/null 2>&1; then + docker container rm $DOCKER_CONTAINER > /dev/null fi docker create --name $DOCKER_CONTAINER --entrypoint /bin/bash $DOCKER_IMAGE docker cp -L $DOCKER_CONTAINER:/etc/os-release $TARGET_VERSIONS_PATH/