Repository navigation
fix(local): resolve loaded images by their manifest digest on the containerd image store - #871
Merged
Merged
Conversation
Docker's containerd image store identifies an image loaded from an OCI archive by the manifest digest listed in the archive's index.json, not by its config digest. Looking up only the config digest made every local container deploy fail with "Docker did not load image" on that store, which is the default for new Docker Desktop installs. Try the index.json manifest digest first, then the config digest used by the classic store. Both are immutable, so a previous load of the same tag can never be picked up by mistake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@greptileai review |
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.
What
Local container deploys (
alien devand local deployments of container resources) failed on Docker's containerd image store withDocker did not load image sha256:…. The containerd store is the default for new Docker Desktop installs.Why
After
docker load, the loaded image was looked up by its config digest. That is the image ID on the classic image store, but on the containerd store the image ID is the manifest digest listed in the archive'sindex.json.How
After loading, read the single manifest digest from the archive's
index.jsonand inspect it first. If that returns 404, fall back to the config digest. Both values are immutable, so a stale image left under the same tag by an earlier load can never be resolved by mistake. A 404 on both IDs, or any other inspect error, fails the deploy with both digests in the message.Verification
New ignored integration test
crates/alien-local/tests/container_image_stores.rs. For each image store it starts a disposabledocker:28-dinddaemon (one with--feature containerd-snapshotter, one classic) and asserts which store is active. It then loads two releases built under the same tag and checks that each container runs its own release's content from a distinct image. It passed locally. On the unfixed code it fails on the containerd store with the originalDocker did not load imageerror.The existing
container_image_releasestest (host classic store) still passes.cargo test -p alien-local: everything passes exceptworker_integration, which needs the TypeScript SDK built and was not set up in this worktree.End-to-end with the CLI built from this branch:
alien devon a Python source container against adocker:28-dinddaemon running the containerd image store (driver-type io.containerd.snapshotter.v1), reached through a unix-socketDOCKER_HOST. The deployment reached Running, the container's image ID was the archive's manifest digest, and the app answered over HTTP. After editing the app,alien dev releasereplaced the container with a new image ID and the app served the new response.🤖 Generated with Claude Code