diff --git a/images/hook-embedded/pull-images.sh b/images/hook-embedded/pull-images.sh index b58ba408..9ba25015 100755 --- a/images/hook-embedded/pull-images.sh +++ b/images/hook-embedded/pull-images.sh @@ -70,6 +70,15 @@ function main() { fi done + # As hook-docker uses the overlay2 storage driver the DinD must use the overlay2 storage driver too. + # make sure the overlay2 storage driver is used by the DinD container. + # The VFS storage driver might get used if /var/lib/docker in the DinD container cannot be used by overlay2. + storage_driver=$(docker exec "${dind_container}" docker info --format '{{.Driver}}') + if [[ "${storage_driver}" != "overlay2" ]]; then + echo "DinD container is not using overlay2 storage driver" + exit 1 + fi + # remove the contents of /var/lib/docker-embedded so that any previous images are removed. Without this it seems to cause boot issues. docker exec "${dind_container}" sh -c "rm -rf /var/lib/docker-embedded/*"