Skip to content

Conversation

@manics
Copy link
Member

@manics manics commented Oct 24, 2025

BinderHub/K8s has a long standing bug where sometimes the docker socket is created as a host directory.

Closes #1230

This is a breaking change since imageCleaner.host.dockerSocket is replaced by imageCleaner.host.dockerSocket{Dir,Name}.

However given that dind has been the recommended way to run BinderHub for a quite a while I don't think it's worth the complexity of adding the Helm template logic to handle the old case.

# cull images until it drops below 60%
imageGCThresholdHigh: 80
imageGCThresholdLow: 60
# cull images on the host docker as well as dind
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it's ever done both

- name: storage-{{ $builderName }}
hostPath:
path: {{ eq $builderName "dind" | ternary $builder.hostLibDir $builder.hostStorageDir }}
type: DirectoryOrCreate
Copy link
Member Author

Choose a reason for hiding this comment

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

The image-cleaner should never create Docker directories, that should be handled by Docker.

BinderHub/K8s has a long standing bug where sometimes the docker socket is created as a host directory.
@manics manics force-pushed the docker-socket-dir branch from 2a5fefc to 9f57d20 Compare November 1, 2025 23:46
type: boolean
description: |
DEPRECATED: use imageCleaner.enabled if the cleaner shall not used.
dockerSocket:
Copy link
Member

Choose a reason for hiding this comment

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

If we want to help people make a transition, this entry could remain allowed, and then if its ovserved in NOTES.txt, we would use the fail template command to error with a message.

We are already erroring if its specified, so this would just be a help to transition

Copy link
Member

Choose a reason for hiding this comment

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

Type would be allowed to be null as well then, and then we would look for it to be set.

I recall z2jh have some deprecation and breaking change message template ready if you want to go for it

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, done!

Shouldn't the hasKey check mean we don't need to make it nullable?`

Copy link
Member

Choose a reason for hiding this comment

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

Ah yes nice!

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Race condition: dind is required to be faster than build pod

2 participants