Skip to content

Commit

Permalink
KubernetesBuildExecutor.docker_host: use None to disable
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Nov 8, 2023
1 parent 2df9bed commit 010acd3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions binderhub/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,13 @@ def _default_builder_info(self):

docker_host = Unicode(
"/var/run/docker.sock",
allow_none=True,
help=(
"The docker socket to use for building the image. "
"Must be a unix domain socket on a filesystem path accessible on the node "
"in which the build pod is running. "
"This is mounted into the build pod, set to empty string to disable, "
"e.g. if you are subclassing this builder and don't need the docker socket."
"This is mounted into the build pod, set to None to disable, "
"e.g. if you are using an alternative builder that doesn't need the docker socket."
),
config=True,
)
Expand Down Expand Up @@ -425,7 +426,7 @@ def get_builder_volumes(self):
volume_mounts = []
volumes = []

if self.docker_host:
if self.docker_host is not None:
volume_mounts.append(
client.V1VolumeMount(
mount_path="/var/run/docker.sock", name="docker-socket"
Expand Down

0 comments on commit 010acd3

Please sign in to comment.