Skip to content

Commit

Permalink
Remove all containers from previous runs
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvolkmann committed Aug 2, 2024
1 parent ee3ef4e commit c7bf65a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/ci-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ make cleanup

echo "Remove containers from previous runs"

docker container list --all --filter label=containerlab=mini-lab --quiet | xargs docker container rm --force
previous_mini_lab_containers=$(docker container list --all --filter label=containerlab=mini-lab --quiet)

if [ ! -z "$previous_mini_lab_containers" ]; then
docker container rm --force $(docker container list --all --filter label=containerlab=mini-lab --quiet)
fi

0 comments on commit c7bf65a

Please sign in to comment.