From 100bbcb308e288b9c9d66f7dfdfe38672e656b11 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 13 Feb 2025 11:13:05 -0800 Subject: [PATCH] Only mount ~/.docker/config.json, not ~/.docker docker buildx wants to write to ~/.docker/buildx, but since we mount the secret *entirely* (to ~/.docker/buildx), it can not. I think mounting *just* the subpath should work. Follow-up to https://github.com/jupyterhub/repo2docker/pull/1402 --- binderhub/build.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/binderhub/build.py b/binderhub/build.py index a5be78d3d..07afb267d 100644 --- a/binderhub/build.py +++ b/binderhub/build.py @@ -448,7 +448,11 @@ def get_builder_volumes(self): if not self.registry_credentials and self.push_secret: volume_mounts.append( - client.V1VolumeMount(mount_path="/root/.docker", name="docker-config") + client.V1VolumeMount( + mount_path="/root/.docker/config.json", + name="docker-config", + sub_path="config.json", + ) ) volumes.append( client.V1Volume(