Skip to content

Commit

Permalink
Merge pull request #294 from carolynvs/bump-docker
Browse files Browse the repository at this point in the history
Bump docker and containerd
  • Loading branch information
carolynvs committed Feb 2, 2023
2 parents 1ca5c87 + d223baa commit 24fd193
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 53 deletions.
6 changes: 3 additions & 3 deletions driver/docker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ func BuildDockerClientOptions() *cliflags.ClientOptions {
// (but don't check the certs).
tlsVerify, tlsConfigured := os.LookupEnv(DockerTLSVerifyEnvVar)
if tlsConfigured && tlsVerify != "" {
cliOpts.Common.TLS = true
cliOpts.TLS = true

// Check if we should verify certs or allow self-signed certs (insecure)
verify, _ := strconv.ParseBool(tlsVerify)
cliOpts.Common.TLSVerify = verify
cliOpts.TLSVerify = verify

// Check if the TLS certs have been overridden
var certPath string
Expand All @@ -66,7 +66,7 @@ func BuildDockerClientOptions() *cliflags.ClientOptions {
certPath = cliOpts.ConfigDir
}

cliOpts.Common.TLSOptions = &tlsconfig.Options{
cliOpts.TLSOptions = &tlsconfig.Options{
CAFile: filepath.Join(certPath, cliflags.DefaultCaFile),
CertFile: filepath.Join(certPath, cliflags.DefaultCertFile),
KeyFile: filepath.Join(certPath, cliflags.DefaultKeyFile),
Expand Down
24 changes: 12 additions & 12 deletions driver/docker/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ func Test_buildDockerClientOptions(t *testing.T) {
t.Run("tls disabled", func(t *testing.T) {
os.Unsetenv(DockerTLSVerifyEnvVar)
opts := BuildDockerClientOptions()
assert.False(t, opts.Common.TLS, "expected TLS to be disabled")
assert.False(t, opts.Common.TLSVerify, "expected TLSVerify to be disabled")
assert.Nil(t, opts.Common.TLSOptions, "expected TLSOptions to be unset")
assert.False(t, opts.TLS, "expected TLS to be disabled")
assert.False(t, opts.TLSVerify, "expected TLSVerify to be disabled")
assert.Nil(t, opts.TLSOptions, "expected TLSOptions to be unset")
})

t.Run("tls enabled without certs", func(t *testing.T) {
Expand All @@ -41,9 +41,9 @@ func Test_buildDockerClientOptions(t *testing.T) {
}()

opts := BuildDockerClientOptions()
assert.True(t, opts.Common.TLS, "expected TLS to be enabled")
assert.True(t, opts.Common.TLSVerify, "expected the certs to be verified")
assert.Equal(t, defaultTLSOptions, opts.Common.TLSOptions, "expected TLSOptions to be initialized to the default TLS settings")
assert.True(t, opts.TLS, "expected TLS to be enabled")
assert.True(t, opts.TLSVerify, "expected the certs to be verified")
assert.Equal(t, defaultTLSOptions, opts.TLSOptions, "expected TLSOptions to be initialized to the default TLS settings")
})

t.Run("tls enabled with custom certs", func(t *testing.T) {
Expand All @@ -55,9 +55,9 @@ func Test_buildDockerClientOptions(t *testing.T) {
}()

opts := BuildDockerClientOptions()
assert.True(t, opts.Common.TLS, "expected TLS to be enabled")
assert.True(t, opts.Common.TLSVerify, "expected the certs to be verified")
assert.Equal(t, customTLSOptions, opts.Common.TLSOptions, "expected TLSOptions to use the custom DOCKER_CERT_PATH set")
assert.True(t, opts.TLS, "expected TLS to be enabled")
assert.True(t, opts.TLSVerify, "expected the certs to be verified")
assert.Equal(t, customTLSOptions, opts.TLSOptions, "expected TLSOptions to use the custom DOCKER_CERT_PATH set")
})

t.Run("tls enabled with self-signed certs", func(t *testing.T) {
Expand All @@ -69,8 +69,8 @@ func Test_buildDockerClientOptions(t *testing.T) {
}()

opts := BuildDockerClientOptions()
assert.True(t, opts.Common.TLS, "expected TLS to be enabled")
assert.False(t, opts.Common.TLSVerify, "expected TLSVerify to be false")
assert.Equal(t, customTLSOptions, opts.Common.TLSOptions, "expected TLSOptions to use the custom DOCKER_CERT_PATH set")
assert.True(t, opts.TLS, "expected TLS to be enabled")
assert.False(t, opts.TLSVerify, "expected TLSVerify to be false")
assert.Equal(t, customTLSOptions, opts.TLSOptions, "expected TLSOptions to use the custom DOCKER_CERT_PATH set")
})
}
26 changes: 12 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ require (
github.com/Masterminds/semver v1.5.0
github.com/cnabio/image-relocation v0.0.0-20220815190842-cd2f11ecad88
github.com/cyberphone/json-canonicalization v0.0.0-20210303052042-6bc126869bf4
github.com/docker/cli v20.10.17+incompatible
github.com/docker/cli v23.0.0-rc.1+incompatible
github.com/docker/distribution v2.8.1+incompatible
github.com/docker/docker v20.10.17+incompatible
github.com/docker/docker v23.0.0-rc.1+incompatible
github.com/docker/go-connections v0.4.0
github.com/hashicorp/go-multierror v1.1.1
github.com/mitchellh/copystructure v1.0.0
Expand All @@ -35,18 +35,17 @@ require (
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/Microsoft/hcsshim v0.9.3 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d // indirect
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bugsnag/bugsnag-go v1.5.0 // indirect
github.com/bugsnag/panicwrap v1.2.0 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cloudflare/cfssl v1.4.1 // indirect
github.com/containerd/cgroups v1.0.3 // indirect
github.com/containerd/containerd v1.6.6 // indirect
github.com/containerd/containerd v1.6.16 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.4.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/docker-credential-helpers v0.6.3 // indirect
Expand All @@ -65,7 +64,6 @@ require (
github.com/go-sql-driver/mysql v1.4.1 // indirect
github.com/gofrs/uuid v3.2.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-containerregistry v0.5.1 // indirect
Expand All @@ -79,12 +77,13 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 // indirect
github.com/klauspost/compress v1.11.13 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mitchellh/reflectwalk v1.0.0 // indirect
github.com/moby/sys/mount v0.2.0 // indirect
github.com/moby/sys/mountinfo v0.6.0 // indirect
github.com/moby/patternmatcher v0.5.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand All @@ -105,23 +104,22 @@ require (
github.com/theupdateframework/notary v0.6.1 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/dancannon/gorethink.v3 v3.0.5 // indirect
gopkg.in/fatih/pool.v2 v2.0.0 // indirect
gopkg.in/gorethink/gorethink.v3 v3.0.5 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
Expand Down
Loading

0 comments on commit 24fd193

Please sign in to comment.