Skip to content

Commit

Permalink
Remove cid file before invoking docker build
Browse files Browse the repository at this point in the history
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: fb62d41 ("Use Docker iid files consequently in builds")
Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed Sep 11, 2023
1 parent fcb969c commit 1cc346a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions embedded-bins/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1cc346a

Please sign in to comment.