[fix.] Docker normal image overlay mount and simplify docs#353
Conversation
There was a problem hiding this comment.
Pull request overview
Fix Docker-mode mounting for normal (non-overlaybd) images by using the container snapshot’s ParentIDs directly and ensuring Docker container layers always get a valid overlay mount; streamline Docker documentation.
Changes:
- Use container snapshot
ParentIDs(instead of querying the init snapshot) when buildinglowerdirpaths for normal images in Docker mode. - Return a standard overlay mount (instead of
nil) for normal-image Docker container layer mounts. - Simplify
docs/DOCKER.mdconfiguration and usage instructions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/snapshot/docker.go | Fixes Docker-mode normal-image lowerdir construction and adds a proper overlay mount fallback for normal images. |
| docs/DOCKER.md | Updates Docker daemon configuration guidance and simplifies the run instructions/output example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| # Pull an overlaybd image | ||
| docker pull registry.hub.docker.com/overlaybd/redis:7.2.3_obd | ||
|
|
||
| # Run with overlaybd snapshotter | ||
| docker run --rm -it --snapshotter=overlaybd registry.hub.docker.com/overlaybd/redis:7.2.3_obd | ||
| ``` | ||
|
|
||
| Or set overlaybd as the default snapshotter: | ||
|
|
||
| ```bash | ||
| # In daemon.json | ||
| { | ||
| "features": { | ||
| "containerd-snapshotter": true | ||
| }, | ||
| "snapshotter": "overlaybd" | ||
| } | ||
| docker run --rm -it registry.hub.docker.com/overlaybd/redis:7.2.3_obd | ||
|
|
||
| Unable to find image 'registry.hub.docker.com/overlaybd/redis:7.2.3_obd' locally | ||
| 7.2.3_obd: Pulling from overlaybd/redis |
There was a problem hiding this comment.
The bash code block mixes the docker run command with its full runtime output (including ASCII art). This makes copy/paste error-prone and can break shell execution. Consider separating into a command-only block and a distinct output block (or use a console-style block with prompts).
Use container snapshot's ParentIDs directly instead of looking up init snapshot for normal image layer paths in Docker mode. Return proper overlay mount fallback instead of nil for normal images. Simplify DOCKER.md by adding storage-driver config and removing outdated troubleshooting/migration sections. Add tests for Docker runtime layer mounts Signed-off-by: Yifan Yuan <tuji.yyf@alibaba-inc.com>
Use container snapshot's ParentIDs directly instead of looking up init snapshot for normal image layer paths in Docker mode. Return proper overlay mount fallback instead of nil for normal images.
Simplify DOCKER.md by adding storage-driver config and removing outdated troubleshooting/migration sections.
Please check the following list: