metasploitable3/chef/cookbooks/docker/libraries/helpers_auth.rb
2017-07-12 18:15:48 -05:00

11 lines
295 B
Ruby

module DockerCookbook
module DockerHelpers
module Authentication
# https://github.com/docker/docker/blob/4fcb9ac40ce33c4d6e08d5669af6be5e076e2574/registry/auth.go#L231
def parse_registry_host(val)
val.sub(%r{https?://}, '').split('/').first
end
end
end
end