Skip to content

Conversation

@benji2k2
Copy link

@benji2k2 benji2k2 commented Dec 17, 2025

In 0.54.0 containerd-snapshotter support was added. But old versions of docker do not support containerd-snapshotter. unfortunately the containerd-client is always initialized - even when ContainerdSnapshotterStorageDriver is not used by docker. this leads to error initializing docker factory for older docker versions.
With this fix containerd-client will only initiallized when ContainerdSnapshotterStorageDriver is used by docker. Therefore older docker versions will work again.

Only initialize containderd for docker if StorageDriver is ContainerdSnapshotterStorageDriver
@google-cla
Copy link

google-cla bot commented Dec 17, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@dims
Copy link
Collaborator

dims commented Dec 17, 2025

@benji2k2 please file the CLA

@benji2k2
Copy link
Author

@benji2k2 please file the CLA

done

@benji2k2
Copy link
Author

There also seems to be an error in my pr - probably containerdClient have to be declared before the if-condition:

var (
  containerdClient *containerd.ContainerdClient
 )

Sorry, I’m not very familiar with Go... Maybe you can fix that for me. Thanks :)

Declared Variable

var (
containerdClient *containerd.ContainerdClient
)
Copy link
Contributor

@sambhav-jain-16 sambhav-jain-16 Dec 17, 2025

Choose a reason for hiding this comment

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

Move this to line 334, that's where all variables are declared :)

Copy link
Author

Choose a reason for hiding this comment

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

done

moved Variable containerdClient to other variables
Changes type (no pointer)
Correct assignment of variable containerdClient

Co-authored-by: Sambhav Jain <67923444+sambhav-jain-16@users.noreply.github.com>
@dims
Copy link
Collaborator

dims commented Dec 18, 2025

please update the PR title to reflect what the PR does. Please add more details in the PR body (you just have one sentence there)

@benji2k2 benji2k2 changed the title Fix for issue #3772 fix: docker working even without containerd Dec 18, 2025
@benji2k2
Copy link
Author

I updated title and description. But i do not see the formatting issue in line 357. can someone take a look for me? I have no Development Environment for Go.

@sambhav-jain-16
Copy link
Contributor

@benji2k2
run make format from root to format your code. it should solve the formatting issue

@benji2k2
Copy link
Author

@sambhav-jain-16 thanks for the hint, i generally know how it works :) but as already mentioned i don't have a development environment for go installed, i just edited the code in the github web ide to fix the bug. therefore "make format" does not work for me without setting up go. can you maybe do this step for me? thanks in advance...

@sambhav-jain-16
Copy link
Contributor

@benji2k2 I tried pushing the format fix, but I don't have the permissions to write to your fork. Can you provide me with the same? Thanks :)

@benji2k2
Copy link
Author

@benji2k2 I tried pushing the format fix, but I don't have the permissions to write to your fork. Can you provide me with the same? Thanks :)

@sambhav-jain-16 you got invitation to my fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants