mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-04-19 00:47:09 +00:00
fix dockerhub default host bug (#534)
Signed-off-by: Adam Martin <adam.martin@ranchergovernment.com>
This commit is contained in:
@@ -47,6 +47,10 @@ func NewRegistryTarget(host string, opts RegistryOptions) *RegistryTarget {
|
||||
)
|
||||
|
||||
hosts := func(h string) ([]cdocker.RegistryHost, error) {
|
||||
host, err := cdocker.DefaultHost(h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
scheme := "https"
|
||||
if opts.PlainHTTP || opts.Insecure {
|
||||
scheme = "http"
|
||||
@@ -55,7 +59,7 @@ func NewRegistryTarget(host string, opts RegistryOptions) *RegistryTarget {
|
||||
Client: http.DefaultClient,
|
||||
Authorizer: authorizer,
|
||||
Scheme: scheme,
|
||||
Host: h,
|
||||
Host: host,
|
||||
Path: "/v2",
|
||||
Capabilities: cdocker.HostCapabilityPull | cdocker.HostCapabilityResolve | cdocker.HostCapabilityPush,
|
||||
}}, nil
|
||||
|
||||
Reference in New Issue
Block a user