Merge pull request #4686 from thaJeztah/update_engine2

vendor: github.com/docker/docker 029519a1498b (v25.0.0-dev)
This commit is contained in:
Sebastiaan van Stijn 2023-12-01 16:45:05 +01:00 committed by GitHub
commit ecf9bd3870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 35 additions and 16 deletions

View File

@ -12,7 +12,7 @@ require (
github.com/creack/pty v1.1.18 github.com/creack/pty v1.1.18
github.com/distribution/reference v0.5.0 github.com/distribution/reference v0.5.0
github.com/docker/distribution v2.8.3+incompatible github.com/docker/distribution v2.8.3+incompatible
github.com/docker/docker v25.0.0-beta.1.0.20231123214119-cfdca8dc1d4c+incompatible // master (v25.0.0-dev) github.com/docker/docker v25.0.0-beta.1.0.20231201152610-029519a1498b+incompatible // master (v25.0.0-dev)
github.com/docker/docker-credential-helpers v0.8.0 github.com/docker/docker-credential-helpers v0.8.0
github.com/docker/go-connections v0.4.1-0.20231110212414-fa09c952e3ea github.com/docker/go-connections v0.4.1-0.20231110212414-fa09c952e3ea
github.com/docker/go-units v0.5.0 github.com/docker/go-units v0.5.0

View File

@ -54,8 +54,8 @@ github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v25.0.0-beta.1.0.20231123214119-cfdca8dc1d4c+incompatible h1:vtRRy4AZp1SEtD2ArQvT3D8fXg/3nHm594VeV6jgGoE= github.com/docker/docker v25.0.0-beta.1.0.20231201152610-029519a1498b+incompatible h1:uGra/1Ry47oq1VviyeTPgZ2N74u8xMBVChIXr/XCr2A=
github.com/docker/docker v25.0.0-beta.1.0.20231123214119-cfdca8dc1d4c+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v25.0.0-beta.1.0.20231201152610-029519a1498b+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8= github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8=
github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40= github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40=
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=

View File

@ -6,6 +6,7 @@ import (
"github.com/docker/docker/api/types/blkiodev" "github.com/docker/docker/api/types/blkiodev"
"github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/mount"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/api/types/strslice" "github.com/docker/docker/api/types/strslice"
"github.com/docker/go-connections/nat" "github.com/docker/go-connections/nat"
units "github.com/docker/go-units" units "github.com/docker/go-units"
@ -133,12 +134,12 @@ type NetworkMode string
// IsNone indicates whether container isn't using a network stack. // IsNone indicates whether container isn't using a network stack.
func (n NetworkMode) IsNone() bool { func (n NetworkMode) IsNone() bool {
return n == "none" return n == network.NetworkNone
} }
// IsDefault indicates whether container uses the default network stack. // IsDefault indicates whether container uses the default network stack.
func (n NetworkMode) IsDefault() bool { func (n NetworkMode) IsDefault() bool {
return n == "default" return n == network.NetworkDefault
} }
// IsPrivate indicates whether container uses its private network stack. // IsPrivate indicates whether container uses its private network stack.

View File

@ -2,6 +2,8 @@
package container // import "github.com/docker/docker/api/types/container" package container // import "github.com/docker/docker/api/types/container"
import "github.com/docker/docker/api/types/network"
// IsValid indicates if an isolation technology is valid // IsValid indicates if an isolation technology is valid
func (i Isolation) IsValid() bool { func (i Isolation) IsValid() bool {
return i.IsDefault() return i.IsDefault()
@ -10,15 +12,15 @@ func (i Isolation) IsValid() bool {
// NetworkName returns the name of the network stack. // NetworkName returns the name of the network stack.
func (n NetworkMode) NetworkName() string { func (n NetworkMode) NetworkName() string {
if n.IsBridge() { if n.IsBridge() {
return "bridge" return network.NetworkBridge
} else if n.IsHost() { } else if n.IsHost() {
return "host" return network.NetworkHost
} else if n.IsContainer() { } else if n.IsContainer() {
return "container" return "container"
} else if n.IsNone() { } else if n.IsNone() {
return "none" return network.NetworkNone
} else if n.IsDefault() { } else if n.IsDefault() {
return "default" return network.NetworkDefault
} else if n.IsUserDefined() { } else if n.IsUserDefined() {
return n.UserDefined() return n.UserDefined()
} }
@ -27,12 +29,12 @@ func (n NetworkMode) NetworkName() string {
// IsBridge indicates whether container uses the bridge network stack // IsBridge indicates whether container uses the bridge network stack
func (n NetworkMode) IsBridge() bool { func (n NetworkMode) IsBridge() bool {
return n == "bridge" return n == network.NetworkBridge
} }
// IsHost indicates whether container uses the host network stack. // IsHost indicates whether container uses the host network stack.
func (n NetworkMode) IsHost() bool { func (n NetworkMode) IsHost() bool {
return n == "host" return n == network.NetworkHost
} }
// IsUserDefined indicates user-created network // IsUserDefined indicates user-created network

View File

@ -1,9 +1,11 @@
package container // import "github.com/docker/docker/api/types/container" package container // import "github.com/docker/docker/api/types/container"
import "github.com/docker/docker/api/types/network"
// IsBridge indicates whether container uses the bridge network stack // IsBridge indicates whether container uses the bridge network stack
// in windows it is given the name NAT // in windows it is given the name NAT
func (n NetworkMode) IsBridge() bool { func (n NetworkMode) IsBridge() bool {
return n == "nat" return n == network.NetworkNat
} }
// IsHost indicates whether container uses the host network stack. // IsHost indicates whether container uses the host network stack.
@ -25,11 +27,11 @@ func (i Isolation) IsValid() bool {
// NetworkName returns the name of the network stack. // NetworkName returns the name of the network stack.
func (n NetworkMode) NetworkName() string { func (n NetworkMode) NetworkName() string {
if n.IsDefault() { if n.IsDefault() {
return "default" return network.NetworkDefault
} else if n.IsBridge() { } else if n.IsBridge() {
return "nat" return network.NetworkNat
} else if n.IsNone() { } else if n.IsNone() {
return "none" return network.NetworkNone
} else if n.IsContainer() { } else if n.IsContainer() {
return "container" return "container"
} else if n.IsUserDefined() { } else if n.IsUserDefined() {

View File

@ -1,8 +1,22 @@
package network // import "github.com/docker/docker/api/types/network" package network // import "github.com/docker/docker/api/types/network"
import ( import (
"github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/filters"
) )
const (
// NetworkDefault is a platform-independent alias to choose the platform-specific default network stack.
NetworkDefault = "default"
// NetworkHost is the name of the predefined network used when the NetworkMode host is selected (only available on Linux)
NetworkHost = "host"
// NetworkNone is the name of the predefined network used when the NetworkMode none is selected (available on both Linux and Windows)
NetworkNone = "none"
// NetworkBridge is the name of the default network on Linux
NetworkBridge = "bridge"
// NetworkNat is the name of the default network on Windows
NetworkNat = "nat"
)
// Address represents an IP address // Address represents an IP address
type Address struct { type Address struct {
Addr string Addr string

2
vendor/modules.txt vendored
View File

@ -53,7 +53,7 @@ github.com/docker/distribution/registry/client/transport
github.com/docker/distribution/registry/storage/cache github.com/docker/distribution/registry/storage/cache
github.com/docker/distribution/registry/storage/cache/memory github.com/docker/distribution/registry/storage/cache/memory
github.com/docker/distribution/uuid github.com/docker/distribution/uuid
# github.com/docker/docker v25.0.0-beta.1.0.20231123214119-cfdca8dc1d4c+incompatible # github.com/docker/docker v25.0.0-beta.1.0.20231201152610-029519a1498b+incompatible
## explicit ## explicit
github.com/docker/docker/api github.com/docker/docker/api
github.com/docker/docker/api/types github.com/docker/docker/api/types