diff --git a/containerd/containerd.go b/containerd/containerd.go index 9dc7e81..07231ff 100644 --- a/containerd/containerd.go +++ b/containerd/containerd.go @@ -88,7 +88,7 @@ func (d *Driver) parshAuth(auth *RegistryAuth) CredentialsOpt { func withResolver(creds CredentialsOpt) containerd.RemoteOpt { resolver := remotesdocker.NewResolver(remotesdocker.ResolverOptions{ Hosts: remotesdocker.ConfigureDefaultRegistries(remotesdocker.WithAuthorizer( - remotesdocker.NewAuthorizer(nil, creds))), + remotesdocker.NewDockerAuthorizer(remotesdocker.WithAuthCreds(creds)))), }) return containerd.WithResolver(resolver) } diff --git a/etchosts/etchosts.go b/etchosts/etchosts.go index b3ca7a4..3550c95 100644 --- a/etchosts/etchosts.go +++ b/etchosts/etchosts.go @@ -21,7 +21,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "os" "strings" @@ -64,7 +63,7 @@ func BuildEtcHosts(hostsFile string) error { return err } } - return ioutil.WriteFile(hostsFile, content.Bytes(), 0644) + return os.WriteFile(hostsFile, content.Bytes(), 0644) } // CopyEtcHosts copies /etc/hosts to NOMAD_TASK_DIR/etc_hosts