From 1cc346a07c391a9b0c0985323f29038b96151973 Mon Sep 17 00:00:00 2001 From: Tom Wieczorek Date: Mon, 11 Sep 2023 11:26:48 +0200 Subject: [PATCH] Remove cid file before invoking docker build Docker will refuse to overwrite the file if it already exists. This breaks the build if make figures out that the containers need to be recreated. Example error message: > container ID file found, make sure the other container isn't running or delete .container.runc Fixes: fb62d41dc ("Use Docker iid files consequently in builds") Signed-off-by: Tom Wieczorek --- embedded-bins/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/embedded-bins/Makefile b/embedded-bins/Makefile index 5ec4b7d01926..f2584f2d0d74 100644 --- a/embedded-bins/Makefile +++ b/embedded-bins/Makefile @@ -58,6 +58,7 @@ $(addprefix $(bindir)/, $(bins)): | $(bindir) docker export $$(cat $<) | tar -C $(dir $(bindir)) -xv bin/$(notdir $@) && touch $@ build_docker_container = \ + rm -f -- '$@'; \ docker create --cidfile='$@' --entrypoint=/dev/null '$(shell cat -- $<)' .container.%: .docker-image.%.stamp