nexus3-oss
nexus3-oss copied to clipboard
Docker repositories httpPort needs to be an integer, although string does work
In the files/groovy/create_repos_from_list.groovy
, docker repository configuration for httpPort is a string. This works, but appears to be incorrect as it breaks the api call beta/repositories.
One way to fix this is by converting httpPort to integer in the groovy script.
if (currentRepo.format == 'docker') {
def httpPort = currentRepo.get('http_port', '')
configuration.attributes['docker'] = [
forceBasicAuth: currentRepo.force_basic_auth,
v1Enabled : currentRepo.v1_enabled,
httpPort : httpPort.isInteger() ? httpPort.toInteger() : null
]
}