Skip to content

Conversation

@ericcurtin
Copy link
Contributor

@ericcurtin ericcurtin commented Nov 18, 2025

So we can do things like:

sudo bootc switch --transport docker-daemon localhost/bootc:latest

@github-actions github-actions bot added the area/ostree Issues related to ostree label Nov 18, 2025
@bootc-bot bootc-bot bot requested a review from jmarrero November 18, 2025 00:30
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for the docker-daemon transport. The changes are generally moving in the right direction, but there's a critical issue regarding the inconsistent handling of the "docker" transport string. It's defined with two different meanings in different parts of the code, which could lead to confusion and bugs. I've provided a suggestion to resolve this inconsistency. Additionally, there's a minor code redundancy that could be cleaned up.

@ericcurtin ericcurtin force-pushed the master branch 2 times, most recently from b8e0810 to 4e00c6e Compare November 18, 2025 00:34
@ericcurtin ericcurtin changed the title --transport docker support --transport docker-daemon support Nov 18, 2025
@ericcurtin ericcurtin force-pushed the master branch 4 times, most recently from 71f2c85 to 471709d Compare November 18, 2025 01:02
@ericcurtin
Copy link
Contributor Author

Some updates made, now we are hitting this issue:

$ sudo bootc switch --transport docker-daemon localhost/bootc:latest
layers already present: 2; layers needed: 75 (31.1 GB)
Fetched layers: 0 B in 0 seconds (0 B/s) error: Switching: Switching (ostree): Pulling: Importing: Unencapsulating base: Layer sha256:cda9fba25fac4004a9ea567d3bc2ba605df47467fc302613e3cddd85e8b5d2ee: Unhandled layer type: application/vnd.docker.image.rootfs.diff.tar.gzip

@ericcurtin ericcurtin force-pushed the master branch 3 times, most recently from 0c4b515 to 87247f0 Compare November 18, 2025 09:59
@ericcurtin
Copy link
Contributor Author

It works now:

#1707

@ericcurtin
Copy link
Contributor Author

@cgwalters @jmarrero PTAL

So we can do things like:

sudo bootc switch --transport docker-daemon localhost/bootc:latest

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
Copy link
Contributor

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

this looks good and straight forward to me.

Comment on lines 26 to 27
/// Even though this indicates gzip compression, docker-daemon actually stores
/// the layers uncompressed, so we need to treat this as uncompressed.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems surprising to me on two levels.

First, in theory the current skopeo proxy should be translating Docker media types to OCI unconditionally.

(Though honestly, I want to get away from supporting docker v2s2 at all, we should emit a deprecation warning or somethign)

Second, yeah the compression thing. Although that may just be really fallout from us not translating from v2s2 to OCI correctly.


Can we instead special case this workaround in the layer_info processing we do only if the input transport is Transport::DockerDaemon?


Also worth at least trying to spawn an agent to cross check all of this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added another commit. Do you prefer the approach in the new commit?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes though I suspect there's still an underlying bug in the skopeo or containers-image-proxy logic here and note that because composefs goes through a different path it'd likely need a similar workaround right now.

To handle this is a different location

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@cgwalters cgwalters enabled auto-merge (rebase) November 18, 2025 16:31
@cgwalters
Copy link
Collaborator

Also while I'm OK letting this slide really in general changes like this should come with a test. I know doing that would be slightly involved at the moment though.

@cgwalters cgwalters merged commit 7e81f9c into bootc-dev:main Nov 18, 2025
35 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ostree Issues related to ostree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants