@@ -297,7 +297,7 @@ def _valid_badge_base_url(self, proposal):
297297 )
298298
299299 push_secret = Unicode (
300- 'binder-push-secret ' ,
300+ 'binder-build-docker-config ' ,
301301 allow_none = True ,
302302 help = """
303303 A kubernetes secret object that provides credentials for pushing built images.
@@ -375,6 +375,22 @@ def docker_build_host_validate(self, proposal):
375375 raise TraitError ("Only unix domain sockets on same node are supported for build_docker_host" )
376376 return proposal .value
377377
378+ build_docker_config = Dict (
379+ None ,
380+ allow_none = True ,
381+ help = """
382+ A dict which will be merged into the .docker/config.json of the build container (repo2docker)
383+ Here, you could for example pass proxy settings as described here:
384+ https://docs.docker.com/network/proxy/#configure-the-docker-client
385+
386+ Note: if you provide your own push_secret, this values wont
387+ have an effect, as the push_secrets will overwrite
388+ .docker/config.json
389+ In this case, make sure that you include your config in your push_secret
390+ """ ,
391+ config = True
392+ )
393+
378394 hub_api_token = Unicode (
379395 help = """API token for talking to the JupyterHub API""" ,
380396 config = True ,
@@ -693,6 +709,7 @@ def initialize(self, *args, **kwargs):
693709 "build_memory_limit" : self .build_memory_limit ,
694710 "build_memory_request" : self .build_memory_request ,
695711 "build_docker_host" : self .build_docker_host ,
712+ "build_docker_config" : self .build_docker_config ,
696713 "base_url" : self .base_url ,
697714 "badge_base_url" : self .badge_base_url ,
698715 "static_path" : os .path .join (HERE , "static" ),
0 commit comments