Skip to content

Commit

Permalink
Only mount ~/.docker/config.json, not ~/.docker
Browse files Browse the repository at this point in the history
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 jupyterhub/repo2docker#1402
  • Loading branch information
yuvipanda committed Feb 13, 2025
1 parent 040c9bb commit 100bbcb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion binderhub/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 100bbcb

Please sign in to comment.