MCPcopy
hub / github.com/moby/moby / WithNetworkMode

Function WithNetworkMode

integration/internal/container/ops.go:55–59  ·  view source on GitHub ↗

WithNetworkMode sets the network mode of the container

(mode string)

Source from the content-addressed store, hash-verified

53
54// WithNetworkMode sets the network mode of the container
55func WithNetworkMode(mode string) func(*TestContainerConfig) {
56 return func(c *TestContainerConfig) {
57 c.HostConfig.NetworkMode = container.NetworkMode(mode)
58 }
59}
60
61// WithDNS sets external DNS servers for the container
62func WithDNS(dns []netip.Addr) func(*TestContainerConfig) {

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…