File tree Expand file tree Collapse file tree 3 files changed +0
-62
lines changed
Expand file tree Collapse file tree 3 files changed +0
-62
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ type DockerCli struct {
6767 err * streams.Out
6868 client client.APIClient
6969 serverInfo ServerInfo
70- contentTrust bool
7170 contextStore store.Store
7271 currentContext string
7372 init sync.Once
@@ -593,7 +592,6 @@ type ServerInfo struct {
593592// environment.
594593func NewDockerCli (ops ... CLIOption ) (* DockerCli , error ) {
595594 defaultOps := []CLIOption {
596- withContentTrustFromEnv (),
597595 WithDefaultContextStoreConfig (),
598596 WithStandardStreams (),
599597 WithUserAgent (UserAgent ()),
Original file line number Diff line number Diff line change 88 "io"
99 "net/http"
1010 "os"
11- "strconv"
1211 "strings"
1312
1413 "github.com/docker/cli/cli/streams"
@@ -76,37 +75,6 @@ func WithErrorStream(err io.Writer) CLIOption {
7675 }
7776}
7877
79- // withContentTrustFromEnv enables content trust on a cli from environment variable DOCKER_CONTENT_TRUST value.
80- func withContentTrustFromEnv () CLIOption {
81- return func (cli * DockerCli ) error {
82- cli .contentTrust = false
83- if e := os .Getenv ("DOCKER_CONTENT_TRUST" ); e != "" {
84- if t , err := strconv .ParseBool (e ); t || err != nil {
85- // treat any other value as true
86- cli .contentTrust = true
87- }
88- }
89- return nil
90- }
91- }
92-
93- // WithContentTrustFromEnv enables content trust on a cli from environment variable DOCKER_CONTENT_TRUST value.
94- //
95- // Deprecated: this option is no longer used, and will be removed in the next release.
96- func WithContentTrustFromEnv () CLIOption {
97- return withContentTrustFromEnv ()
98- }
99-
100- // WithContentTrust enables content trust on a cli.
101- //
102- // Deprecated: this option is no longer used, and will be removed in the next release.
103- func WithContentTrust (enabled bool ) CLIOption {
104- return func (cli * DockerCli ) error {
105- cli .contentTrust = enabled
106- return nil
107- }
108- }
109-
11078// WithDefaultContextStoreConfig configures the cli to use the default context store configuration.
11179func WithDefaultContextStoreConfig () CLIOption {
11280 return func (cli * DockerCli ) error {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments