From 8ea5d5201eacbcbab02dac6290afe2ce653ccc6a Mon Sep 17 00:00:00 2001 From: Danny Kulchinsky Date: Fri, 29 Sep 2017 21:39:45 -0400 Subject: [PATCH] Make docker http connector port optional --- files/groovy/create_repo_docker_group.groovy | 5 ++++- files/groovy/create_repo_docker_hosted.groovy | 5 ++++- files/groovy/create_repo_docker_proxy.groovy | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/files/groovy/create_repo_docker_group.groovy b/files/groovy/create_repo_docker_group.groovy index 6b144a2..b64c2c5 100644 --- a/files/groovy/create_repo_docker_group.groovy +++ b/files/groovy/create_repo_docker_group.groovy @@ -9,7 +9,6 @@ configuration = new Configuration( online: true, attributes: [ docker: [ - httpPort: parsed_args.http_port, v1Enabled : parsed_args.v1_enabled ], group: [ @@ -23,6 +22,10 @@ configuration = new Configuration( ] ) +if (parsed_args.http_port) { + configuration.attributes['docker']['httpPort'] = parsed_args.http_port +} + def existingRepository = repository.getRepositoryManager().get(parsed_args.name) if (existingRepository != null) { diff --git a/files/groovy/create_repo_docker_hosted.groovy b/files/groovy/create_repo_docker_hosted.groovy index d68b2a2..d78c822 100644 --- a/files/groovy/create_repo_docker_hosted.groovy +++ b/files/groovy/create_repo_docker_hosted.groovy @@ -9,7 +9,6 @@ configuration = new Configuration( online: true, attributes: [ docker: [ - httpPort: parsed_args.http_port, v1Enabled : parsed_args.v1_enabled ], storage: [ @@ -20,6 +19,10 @@ configuration = new Configuration( ] ) +if (parsed_args.http_port) { + configuration.attributes['docker']['httpPort'] = parsed_args.http_port +} + def existingRepository = repository.getRepositoryManager().get(parsed_args.name) if (existingRepository != null) { diff --git a/files/groovy/create_repo_docker_proxy.groovy b/files/groovy/create_repo_docker_proxy.groovy index edab0fc..e4a8abd 100644 --- a/files/groovy/create_repo_docker_proxy.groovy +++ b/files/groovy/create_repo_docker_proxy.groovy @@ -9,7 +9,6 @@ configuration = new Configuration( online: true, attributes: [ docker: [ - httpPort: parsed_args.http_port, v1Enabled : parsed_args.v1_enabled ], proxy: [ @@ -36,6 +35,10 @@ configuration = new Configuration( ] ) +if (parsed_args.http_port) { + configuration.attributes['docker']['httpPort'] = parsed_args.http_port +} + def existingRepository = repository.getRepositoryManager().get(parsed_args.name) if (existingRepository != null) {