Given that this problem has existed for years, occurs on multiple deployments, and can result in a prolonged outage until a manual fix is made (most recently today- both Curvenote nodes were hit by this bug simultaneously blocking all builds), I think we should automate the fix.
I originally made this controllable with parameter {dind,pink}.cleanupIncorrectSocketDir but I've removed it in commit d6c66045a0168c8e00f685e1fbf8f21498171392 to reduce the added logic, I'm happy to add it back though.
BinderHub has a well known problem where the docker.socket is created as a directory, which then causes dind to crash: https://github.com/jupyterhub/mybinder.org-deploy/blob/61c0cbedddee92dbcd252e02d9bd02b5a5b94d58/docs/source/operation_guide/common_problems.md#the-docker-in-docker-socket
Given that this problem has existed for years, occurs on multiple deployments, and can result in a prolonged outage until a manual fix is made (most recently today- both Curvenote nodes were hit by this bug simultaneously blocking all builds), I think we should automate the fix.
I originally made this controllable with parameter
{dind,pink}.cleanupIncorrectSocketDir
but I've removed it in commit d6c66045a0168c8e00f685e1fbf8f21498171392 to reduce the added logic, I'm happy to add it back though.