Fix build failure from stale .docker-image stamp - #1
Open
jordanhubbard wants to merge 1 commit into
Open
Conversation
The .docker-image stamp only tracked tools/Dockerfile's mtime, not whether the pythonos-builder image still existed in the local Docker daemon. After the image was pruned/removed, the stale stamp made make skip rebuilding it and go straight to `docker run`, which failed with "pull access denied" since the image was gone. Detect the missing-image case at parse time and drop the stale stamp so it gets rebuilt. Guarded with a `docker` availability check since the same GNUmakefile is re-parsed inside the build container (no docker-in-docker there), where the check would otherwise misfire and delete the stamp mid-build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
make buildwas failing withpull access denied for pythonos-builderbecause the.docker-imagestamp file only trackedtools/Dockerfile's mtime, not whether thepythonos-builderimage still existed in the local Docker daemon.docker system prune), the stale stamp causedmaketo skip thedocker buildstep and go straight todocker run, which failed since the image was gone.docker image inspect), and delete the stale stamp so it gets rebuilt. Guarded with acommand -v dockercheck because the sameGNUmakefileis re-parsed inside the build container itself (no docker-in-docker there) — without the guard this check misfired inside the container and deleted the stamp mid-build.Test plan
docker rmi pythonos-builder, ranmake build→ reproducedpull access deniederror.make buildfrom a clean state (no image, no stamp) → succeeded end-to-end, producedbuild-arm64/pythonos-arm64.elf.docker build(~28s, no unnecessary rebuild).