Unable to attach or mount volumes: unmounted volumes=[dockersocket-host]

Hello, I was able to successfully deploy BinderHub and JypyterHub on OpenShift 4.9. I can visit BinderHub’s page, but if I launch anything, the containers in OpenShift, and the binderhub-image-cleaner pods have the following errors:

MountVolume.SetUp failed for volume "dockersocket-dind" : hostPath type check failed: /var/run/dind/docker.sock is not a socket file

Unable to attach or mount volumes: unmounted volumes=[dockersocket-host], unattached volumes=[kube-api-access-ft6dp dockerlib-dind dockersocket-dind dockerlib-host dockersocket-host]: timed out waiting for the condition

Unable to attach or mount volumes: unmounted volumes=[dockersocket-host], unattached volumes=[dockerlib-host dockersocket-host kube-api-access-ft6dp dockerlib-dind dockersocket-dind]: timed out waiting for the condition

MountVolume.SetUp failed for volume "dockersocket-host" : hostPath type check failed: /var/run/docker.sock is not a socket file

Unable to attach or mount volumes: unmounted volumes=[dockersocket-host], unattached volumes=[dockersocket-dind dockerlib-host dockersocket-host kube-api-access-ft6dp dockerlib-dind]: timed out waiting for the condition

any help is greatly appreciated!

OpenShift imposes stronger security rules than a standard Kubernetes cluster. Maybe it prevents you from connecting to the Docker daemon?

Not sure where to go from here. I was having issues deploying at first until I gave this project privileged access. I am now able to deploy and browse to BinderHub’s URL and JupyterHub’s URL, just not able run anything due to the error above!

Looks like OpenShift 4 no longer has a docker daemon (OpenShift 4: Image Builds). Is there anything I can do to make this work on OpenShift 4?

Short answer: no not easily.

Longer answer:
There’s some development work in BinderHub to decouple the building of images from the launching of them. For example, you can run BinderHub without Kubernetes:

repo2docker has a pluggable container engine:

For example you can use rootless daemonless Podman instead of Docker:

You could write a new repo2docker engine that uses a build system supported by OpenShift?

I’ve opened an issue on the BinderHub repo:

1 Like

Thank you! I will keep monitoring this. In the meantime, we need something and have found deepnote to do what we need. That said, once BinderHub has full support for OpenShift, it will be very easy for us to switch back.

Let me know if there is anything I can help test on OpenShift.

1 Like