Skip to content

[fix.] Docker normal image overlay mount and simplify docs#353

Merged
BigVan merged 1 commit into
containerd:mainfrom
BigVan:main
May 22, 2026
Merged

[fix.] Docker normal image overlay mount and simplify docs#353
BigVan merged 1 commit into
containerd:mainfrom
BigVan:main

Conversation

@BigVan
Copy link
Copy Markdown
Member

@BigVan BigVan commented Apr 26, 2026

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:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 building lowerdir paths for normal images in Docker mode.
  • Return a standard overlay mount (instead of nil) for normal-image Docker container layer mounts.
  • Simplify docs/DOCKER.md configuration 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.

Comment thread docs/DOCKER.md
Comment thread docs/DOCKER.md
Comment on lines 87 to +92
```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
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment thread pkg/snapshot/docker.go
@BigVan BigVan added the ok-to-test Pull request is ok to run ci test label Apr 27, 2026
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>
@BigVan BigVan merged commit dfcdcf8 into containerd:main May 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Pull request is ok to run ci test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants