Merge pull request #3935 from thaJeztah/remove_networkdisabled

cli/command/container: remove unused NetworkDisabled field
This commit is contained in:
Sebastiaan van Stijn 2022-12-27 16:04:49 +01:00 committed by GitHub
commit ed94b6ee91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 18 deletions

View File

@ -598,24 +598,20 @@ func parse(flags *pflag.FlagSet, copts *containerOptions, serverOS string) (*con
ExposedPorts: ports, ExposedPorts: ports,
User: copts.user, User: copts.user,
Tty: copts.tty, Tty: copts.tty,
// TODO: deprecated, it comes from -n, --networking OpenStdin: copts.stdin,
// it's still needed internally to set the network to disabled AttachStdin: attachStdin,
// if e.g. bridge is none in daemon opts, and in inspect AttachStdout: attachStdout,
NetworkDisabled: false, AttachStderr: attachStderr,
OpenStdin: copts.stdin, Env: envVariables,
AttachStdin: attachStdin, Cmd: runCmd,
AttachStdout: attachStdout, Image: copts.Image,
AttachStderr: attachStderr, Volumes: volumes,
Env: envVariables, MacAddress: copts.macAddress,
Cmd: runCmd, Entrypoint: entrypoint,
Image: copts.Image, WorkingDir: copts.workingDir,
Volumes: volumes, Labels: opts.ConvertKVStringsToMap(labels),
MacAddress: copts.macAddress, StopSignal: copts.stopSignal,
Entrypoint: entrypoint, Healthcheck: healthConfig,
WorkingDir: copts.workingDir,
Labels: opts.ConvertKVStringsToMap(labels),
StopSignal: copts.stopSignal,
Healthcheck: healthConfig,
} }
if flags.Changed("stop-timeout") { if flags.Changed("stop-timeout") {
config.StopTimeout = &copts.stopTimeout config.StopTimeout = &copts.stopTimeout