Compare commits

...

13 Commits

Author SHA1 Message Date
Paweł Gronowski
198b5e3ed5 Merge pull request #51528 from akerouanton/backport-revendor-ishidawataru-sctp
[docker-29.x backport] Backport revendor ishidawataru sctp
2025-11-14 16:23:22 +01:00
Albin Kerouanton
2ad480ccf5 vendor: github.com/ishidawataru/sctp v0.0.0-20251114114122-1
full diff: 4b890084db..19ddcbc6aa

Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
2025-11-14 16:08:51 +01:00
Paweł Gronowski
cb6c1c3aca Merge pull request #51516 from vvoland/51492-docker-29.x
[docker-29.x backport] daemon: Fix image store choice priority for prior graphdriver state
2025-11-14 09:25:54 +01:00
Paweł Gronowski
2a18530fb2 Merge pull request #51513 from vvoland/51503-docker-29.x
[docker-29.x backport] hack/test/unit: Fix api and client module testing without replace rules
2025-11-14 09:25:21 +01:00
Paweł Gronowski
14c4e0d73a Merge pull request #51514 from vvoland/51493-docker-29.x
[docker-29.x backport] c8d/builder-next: Don't force unpack
2025-11-14 09:25:01 +01:00
Rob Murray
d23fd38f8b Merge pull request #51515 from vvoland/51495-docker-29.x
[docker-29.x backport] libnet: create DNS records on sbJoin (if not agent node)
2025-11-13 22:35:23 +00:00
Paweł Gronowski
3076530aa6 daemon: Fix image store choice priority for prior graphdriver state
The priority order for determining image store choice was incorrect when
a prior graphdriver existed.

The issue occurred because the prior graphdriver check happened after
processing explicit driver configuration, effectively ignoring user
intent when prior state existed.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 391247ce96)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:44:49 +01:00
Paweł Gronowski
7a3cdd2c86 daemon: Add TestDetermineImageStoreChoice
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit c5d0e3e6fa)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:44:37 +01:00
Albin Kerouanton
d7b6f3a7d3 inte/networking: TestDisableIPv6OnInterface: add '-c1' to ping
If the DNS name still resolves to an IP address, and that address is
assigned to a running container, the ping command will run indefinitely
and the test suite will time out for 10 mins.

This is confusing, as it looks like a daemon hang, or a test suite hang,
whereas it's just a test failure. Add '-c1' to ping to make it return
immediately.

Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
(cherry picked from commit 53ea70ea46)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:44:17 +01:00
Albin Kerouanton
7f5694cda1 inte/networking: test DNS resolution for non swarm-scoped nws
Previous commit reverted a faulty change that broke DNS resolution for
non swarm-scoped networks once a node has joined a Swarm cluster.

This commit adds an integration test to verify that we don't break DNS
resolution again.

Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
(cherry picked from commit 47bd247d4d)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:44:16 +01:00
Albin Kerouanton
0e2d804e48 libnet: create DNS records on sbJoin (if not agent node)
Commit a8b9eff90 removed a call to Network.updateSvcRecord from
Network.createEndpoint on the grounds that:

> all callers of Network.createEndpoint follow up with an Endpoint.Join,
> which also sets up the DNS entry.

However, the original call in Network.createEndpoint was gated by:

```
if !n.getController().isSwarmNode() || n.Scope() != scope.Swarm || !n.driverIsMultihost() {
	n.updateSvcRecord(context.WithoutCancel(ctx), ep, true)
}
```

whereas the call in Endpoint.sbJoin() (invoked by Endpoint.Join()) is
gated by:

```
if !n.getController().isAgent() {
    if !n.getController().isSwarmNode() || n.Scope() != scope.Swarm || !n.driverIsMultihost() {
	    n.updateSvcRecord(context.WithoutCancel(ctx), ep, true)
    }
}
```

As a result, once a node has joined a Swarm cluster, no DNS entries are
created for non swarm-scoped networks.

Change the condition used by `sbJoin` to match the original condition
used in `createEndpoint`.

Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
(cherry picked from commit 2e41476a5f)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:44:09 +01:00
Paweł Gronowski
7242ccd7a0 c8d/builder-next: Don't force unpack
The image exporter wrapper was unconditionally setting `unpack=true` for
all build exports, preventing users from controlling this behavior
through buildkit's output image exporter option.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit b4f9bd1cb3)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:43:42 +01:00
Paweł Gronowski
b6705d5e1a hack/test/unit: Fix api and client module testing without replace rules
Running sub-package tests from the root module without readding the
replace rules wasn't running the tests from the local in-tree versions
of these submodules.

Fix by cd-ing into their directories before running tests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 0f597561e8)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-13 20:42:58 +01:00
11 changed files with 365 additions and 59 deletions

View File

@@ -873,7 +873,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
}
d.configStore.Store(cfgStore)
imgStoreChoice, err := determineImageStoreChoice(config)
imgStoreChoice, err := determineImageStoreChoice(config, determineImageStoreChoiceOptions{})
if err != nil {
return nil, err
}
@@ -1098,7 +1098,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
return nil, err
}
driverName := chooseDriver(ctx, cfgStore.GraphDriver, imgStoreChoice)
driverName := getDriverOverride(ctx, cfgStore.GraphDriver, imgStoreChoice)
var migrationConfig migration.Config
if imgStoreChoice.IsGraphDriver() {

View File

@@ -48,14 +48,14 @@ func (c imageStoreChoice) IsExplicit() bool {
}
}
// chooseDriver determines the storage driver name based on environment variables,
// getDriverOverride determines the storage driver name based on environment variables,
// configuration, and platform-specific logic.
// On Windows we don't support the environment variable, or a user supplied graphdriver,
// but it is allowed when using snapshotters.
// Unix platforms however run a single graphdriver for all containers, and it can
// be set through an environment variable, a daemon start parameter, or chosen through
// initialization of the layerstore through driver priority order for example.
func chooseDriver(ctx context.Context, cfgGraphDriver string, imgStoreChoice imageStoreChoice) string {
func getDriverOverride(ctx context.Context, cfgGraphDriver string, imgStoreChoice imageStoreChoice) string {
driverName := os.Getenv("DOCKER_DRIVER")
if driverName == "" {
driverName = cfgGraphDriver
@@ -85,9 +85,25 @@ func chooseDriver(ctx context.Context, cfgGraphDriver string, imgStoreChoice ima
return driverName
}
func determineImageStoreChoice(cfgStore *config.Config) (imageStoreChoice, error) {
type determineImageStoreChoiceOptions struct {
hasPriorDriver func(root string) bool
isRegisteredGraphdriver func(driverName string) bool
runtimeOS string
}
func determineImageStoreChoice(cfgStore *config.Config, opts determineImageStoreChoiceOptions) (imageStoreChoice, error) {
if opts.hasPriorDriver == nil {
opts.hasPriorDriver = graphdriver.HasPriorDriver
}
if opts.isRegisteredGraphdriver == nil {
opts.isRegisteredGraphdriver = graphdriver.IsRegistered
}
if opts.runtimeOS == "" {
opts.runtimeOS = runtime.GOOS
}
out := imageStoreChoiceContainerd
if runtime.GOOS == "windows" {
if opts.runtimeOS == "windows" {
out = imageStoreChoiceGraphdriver
}
@@ -111,44 +127,27 @@ func determineImageStoreChoice(cfgStore *config.Config) (imageStoreChoice, error
out = imageStoreChoiceGraphdriverExplicit
}
if out == imageStoreChoiceContainerd {
if opts.hasPriorDriver(cfgStore.Root) {
return imageStoreChoiceGraphdriverPrior, nil
}
}
if driverName != "" {
if !out.IsExplicit() {
switch driverName {
case "vfs", "overlay2":
out = imageStoreChoiceGraphdriverExplicit
case "btrfs":
// The btrfs driver is not heavily used in containerd and has no
// advantage over overlayfs anymore since overlay works fine.
// If btrfs is explicitly chosen, the user most likely means graphdrivers.
out = imageStoreChoiceGraphdriverExplicit
}
if !out.IsExplicit() && opts.isRegisteredGraphdriver(driverName) {
return imageStoreChoiceGraphdriverExplicit, nil
}
if out.IsGraphDriver() {
if graphdriver.IsRegistered(driverName) {
if opts.isRegisteredGraphdriver(driverName) {
return imageStoreChoiceGraphdriverExplicit, nil
} else {
} else if out.IsExplicit() {
return imageStoreChoiceGraphdriverExplicit, fmt.Errorf("graphdriver is explicitly enabled but %q is not registered, %v %v", driverName, cfgStore.Features, os.Getenv("TEST_INTEGRATION_USE_GRAPHDRIVER"))
}
}
if runtime.GOOS == "windows" && !out.IsExplicit() {
switch driverName {
case "windows":
return imageStoreChoiceContainerdExplicit, nil
case "windowsfilter":
return imageStoreChoiceGraphdriverExplicit, nil
}
}
// Assume snapshotter is chosen
return imageStoreChoiceContainerdExplicit, nil
}
if out == imageStoreChoiceContainerd {
if graphdriver.HasPriorDriver(cfgStore.Root) {
return imageStoreChoiceGraphdriverPrior, nil
}
}
return out, nil
}

View File

@@ -0,0 +1,269 @@
package daemon
import (
"slices"
"testing"
"github.com/moby/moby/v2/daemon/config"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
func TestDetermineImageStoreChoice(t *testing.T) {
str := func(s string) *string {
return &s
}
type testCase struct {
name string
envDockerDriver *string
envTestUseGraphDriver *string
priorGraphDriver bool
cfg *config.Config
expectedChoice imageStoreChoice
expectError bool
skipPlatform string
onlyPlatform string
}
tests := []testCase{
{
name: "containerd-snapshotter feature enabled",
cfg: &config.Config{
CommonConfig: config.CommonConfig{
Features: map[string]bool{
"containerd-snapshotter": true,
},
},
},
expectedChoice: imageStoreChoiceContainerdExplicit,
},
{
name: "containerd-snapshotter feature disabled",
cfg: &config.Config{
CommonConfig: config.CommonConfig{
Features: map[string]bool{
"containerd-snapshotter": false,
},
},
},
expectedChoice: imageStoreChoiceGraphdriverExplicit,
},
{
name: "TEST_INTEGRATION_USE_GRAPHDRIVER env var set",
envTestUseGraphDriver: str("1"),
cfg: &config.Config{
CommonConfig: config.CommonConfig{
Features: map[string]bool{},
},
},
expectedChoice: imageStoreChoiceGraphdriverExplicit,
},
{
name: "TEST_INTEGRATION_USE_GRAPHDRIVER takes precedence over feature flag",
envTestUseGraphDriver: str("1"),
cfg: &config.Config{
CommonConfig: config.CommonConfig{
Features: map[string]bool{
"containerd-snapshotter": true,
},
},
},
expectedChoice: imageStoreChoiceGraphdriverExplicit,
},
{
name: "native driver in config",
cfg: &config.Config{
CommonConfig: config.CommonConfig{
GraphDriver: "native",
Features: map[string]bool{},
},
},
expectedChoice: imageStoreChoiceContainerdExplicit,
},
{
name: "vfs driver in config",
cfg: &config.Config{
CommonConfig: config.CommonConfig{
GraphDriver: "vfs",
Features: map[string]bool{},
},
},
expectedChoice: imageStoreChoiceGraphdriverExplicit,
},
{
name: "custom snapshotter",
envDockerDriver: str("my-custom-snapshotter"),
cfg: &config.Config{
CommonConfig: config.CommonConfig{
Features: map[string]bool{},
},
},
expectedChoice: imageStoreChoiceContainerdExplicit,
},
}
nonWindows := []testCase{
{
name: "default containerd on non-Windows",
cfg: &config.Config{
CommonConfig: config.CommonConfig{
Features: map[string]bool{},
},
},
expectedChoice: imageStoreChoiceContainerd,
},
}
for _, gd := range []string{"fuse-overlayfs", "overlay2", "btrfs", "zfs"} {
nonWindows = append(nonWindows, testCase{
name: gd + " driver in config",
cfg: &config.Config{
CommonConfig: config.CommonConfig{
GraphDriver: gd,
Features: map[string]bool{},
},
},
expectedChoice: imageStoreChoiceGraphdriverExplicit,
})
nonWindows = append(nonWindows, testCase{
name: gd + " driver in config with prior data",
cfg: &config.Config{
CommonConfig: config.CommonConfig{
GraphDriver: gd,
Features: map[string]bool{},
},
},
priorGraphDriver: true,
expectedChoice: imageStoreChoiceGraphdriverPrior,
})
nonWindows = append(nonWindows, testCase{
name: gd + " driver in config with containerd snapshotter feature enabled",
cfg: &config.Config{
CommonConfig: config.CommonConfig{
GraphDriver: gd,
Features: map[string]bool{
"containerd-snapshotter": true,
},
},
},
expectedChoice: imageStoreChoiceContainerdExplicit,
})
nonWindows = append(nonWindows, testCase{
name: gd + " driver in config with containerd snapshotter feature disabled",
cfg: &config.Config{
CommonConfig: config.CommonConfig{
GraphDriver: gd,
Features: map[string]bool{
"containerd-snapshotter": false,
},
},
},
expectedChoice: imageStoreChoiceGraphdriverExplicit,
})
nonWindows = append(nonWindows, testCase{
name: gd + " driver in config with TEST_INTEGRATION_USE_GRAPHDRIVER env var set",
envTestUseGraphDriver: str("1"),
cfg: &config.Config{
CommonConfig: config.CommonConfig{
GraphDriver: gd,
Features: map[string]bool{},
},
},
expectedChoice: imageStoreChoiceGraphdriverExplicit,
})
}
windows := []testCase{
{
name: "default graphdriver on Windows",
cfg: &config.Config{
CommonConfig: config.CommonConfig{
Features: map[string]bool{},
},
},
expectedChoice: imageStoreChoiceGraphdriver,
},
{
name: "windows driver on Windows",
envDockerDriver: str("windows"),
cfg: &config.Config{
CommonConfig: config.CommonConfig{
Features: map[string]bool{},
},
},
expectedChoice: imageStoreChoiceContainerdExplicit,
},
{
name: "windowsfilter driver on Windows",
envDockerDriver: str("windowsfilter"),
cfg: &config.Config{
CommonConfig: config.CommonConfig{
Features: map[string]bool{},
},
},
expectedChoice: imageStoreChoiceGraphdriverExplicit,
},
}
for i := range nonWindows {
nonWindows[i].skipPlatform = "windows"
}
tests = append(tests, nonWindows...)
for i := range windows {
windows[i].onlyPlatform = "windows"
}
tests = append(tests, windows...)
registeredDrivers := []string{"fuse-overlayfs", "overlay2", "btrfs", "zfs", "vfs"}
windowsRegisteredDrivers := []string{"vfs", "windowsfilter"}
for _, os := range []string{"linux", "windows"} {
for _, tc := range tests {
if tc.skipPlatform != "" && os == tc.skipPlatform {
continue
}
if tc.onlyPlatform != "" && os != tc.onlyPlatform {
continue
}
t.Run(os+"/"+tc.name, func(t *testing.T) {
if tc.envDockerDriver != nil {
t.Setenv("DOCKER_DRIVER", *tc.envDockerDriver)
} else {
t.Setenv("DOCKER_DRIVER", "")
}
if tc.envTestUseGraphDriver != nil {
t.Setenv("TEST_INTEGRATION_USE_GRAPHDRIVER", *tc.envTestUseGraphDriver)
} else {
t.Setenv("TEST_INTEGRATION_USE_GRAPHDRIVER", "")
}
choice, err := determineImageStoreChoice(tc.cfg, determineImageStoreChoiceOptions{
runtimeOS: os,
hasPriorDriver: func(root string) bool {
return tc.priorGraphDriver
},
isRegisteredGraphdriver: func(driverName string) bool {
if os == "windows" {
return slices.Contains(windowsRegisteredDrivers, driverName)
}
return slices.Contains(registeredDrivers, driverName)
},
})
if tc.expectError {
assert.Error(t, err, "expected an error but got none")
} else {
assert.NilError(t, err)
}
assert.Check(t, is.Equal(tc.expectedChoice, choice))
})
}
}
}

View File

@@ -48,7 +48,10 @@ func (e *imageExporterMobyWrapper) Resolve(ctx context.Context, id int, exporter
return nil, err
}
exporterAttrs[string(exptypes.OptKeyName)] = strings.Join(reposAndTags, ",")
exporterAttrs[string(exptypes.OptKeyUnpack)] = "true"
if _, has := exporterAttrs[string(exptypes.OptKeyUnpack)]; !has {
exporterAttrs[string(exptypes.OptKeyUnpack)] = "true"
}
if _, has := exporterAttrs[string(exptypes.OptKeyDanglingPrefix)]; !has {
exporterAttrs[string(exptypes.OptKeyDanglingPrefix)] = "moby-dangling"
}

View File

@@ -348,10 +348,8 @@ func (sb *Sandbox) populateNetworkResources(ctx context.Context, ep *Endpoint) (
// Populate DNS records.
n := ep.getNetwork()
if !n.getController().isAgent() {
if !n.getController().isSwarmNode() || n.Scope() != scope.Swarm || !n.driverIsMultihost() {
n.updateSvcRecord(context.WithoutCancel(ctx), ep, true)
}
if !n.getController().isSwarmNode() || n.Scope() != scope.Swarm || !n.driverIsMultihost() {
n.updateSvcRecord(context.WithoutCancel(ctx), ep, true)
}
if err := ep.addDriverInfoToCluster(); err != nil {

2
go.mod
View File

@@ -51,7 +51,7 @@ require (
github.com/hashicorp/go-memdb v1.3.5
github.com/hashicorp/memberlist v0.4.0
github.com/hashicorp/serf v0.8.5
github.com/ishidawataru/sctp v0.0.0-20250829011129-4b890084db30
github.com/ishidawataru/sctp v0.0.0-20251114114122-19ddcbc6aae2
github.com/miekg/dns v1.1.66
github.com/mistifyio/go-zfs/v3 v3.0.1
github.com/mitchellh/copystructure v1.2.0

4
go.sum
View File

@@ -343,8 +343,8 @@ github.com/in-toto/in-toto-golang v0.9.0/go.mod h1:xsBVrVsHNsB61++S6Dy2vWosKhuA3
github.com/inconshreveable/log15 v0.0.0-20170622235902-74a0988b5f80/go.mod h1:cOaXtrgN4ScfRrD9Bre7U1thNq5RtJ8ZoP4iXVGRj6o=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/ishidawataru/sctp v0.0.0-20250829011129-4b890084db30 h1:SF8DGX8bGAXMAvxtJvFFy2KIAPwxIEDP3XpzZVhz0i4=
github.com/ishidawataru/sctp v0.0.0-20250829011129-4b890084db30/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg=
github.com/ishidawataru/sctp v0.0.0-20251114114122-19ddcbc6aae2 h1:36qep4gxKs+JgeHGWeQ040RyZdt9kQlLglL1rFVn/oQ=
github.com/ishidawataru/sctp v0.0.0-20251114114122-19ddcbc6aae2/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg=
github.com/jmoiron/sqlx v1.3.3 h1:j82X0bf7oQ27XeqxicSZsTU5suPwKElg3oyxNn43iTk=
github.com/jmoiron/sqlx v1.3.3/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ=
github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA=

View File

@@ -38,14 +38,17 @@ if [ -n "${api_pkg_list}" ]; then
# is not provided by any known module.
# - `-mod=readonly` tells the go command to ignore the vendor directory
# and to report an error if `go.mod` needs to be updated.
gotestsum --format=standard-quiet --jsonfile=bundles/api-go-test-report.json --junitfile=bundles/api-junit-report.xml -- \
"${BUILDFLAGS[@]}" \
-cover \
-coverprofile=bundles/api-coverage.out \
-covermode=atomic \
-mod=readonly \
${TESTFLAGS} \
${api_pkg_list}
(
cd api
gotestsum --format=standard-quiet --jsonfile=../bundles/api-go-test-report.json --junitfile=../bundles/api-junit-report.xml -- \
"${BUILDFLAGS[@]}" \
-cover \
-coverprofile=../bundles/api-coverage.out \
-covermode=atomic \
-mod=readonly \
${TESTFLAGS} \
${api_pkg_list} || exit $?
)
fi
case "$TESTDIRS" in
@@ -65,14 +68,17 @@ if [ -n "${client_pkg_list}" ]; then
# is not provided by any known module.
# - `-mod=readonly` tells the go command to ignore the vendor directory
# and to report an error if `go.mod` needs to be updated.
gotestsum --format=standard-quiet --jsonfile=bundles/client-go-test-report.json --junitfile=bundles/client-junit-report.xml -- \
"${BUILDFLAGS[@]}" \
-cover \
-coverprofile=bundles/client-coverage.out \
-covermode=atomic \
-mod=readonly \
${TESTFLAGS} \
${client_pkg_list}
(
cd client
gotestsum --format=standard-quiet --jsonfile=../bundles/client-go-test-report.json --junitfile=../bundles/client-junit-report.xml -- \
"${BUILDFLAGS[@]}" \
-cover \
-coverprofile=../bundles/client-coverage.out \
-covermode=atomic \
-mod=readonly \
${TESTFLAGS} \
${client_pkg_list} || exit $?
)
fi
case "$TESTDIRS" in

View File

@@ -1092,7 +1092,7 @@ func TestDisableIPv6OnInterface(t *testing.T) {
// There should not be an IPv6 DNS or /etc/hosts entry.
runRes := container.RunAttach(ctx, t, c,
container.WithNetworkMode(tc.netName),
container.WithCmd("ping", "-6", ctrName),
container.WithCmd("ping", "-6", "-c1", ctrName),
)
assert.Check(t, is.Equal(runRes.ExitCode, 1))
assert.Check(t, is.Contains(runRes.Stderr.String(), "bad address"))
@@ -2032,3 +2032,29 @@ func TestLegacyLinksEnvVars(t *testing.T) {
})
}
}
// TestDNSNamesForNonSwarmScopedNetworks checks that container names can be resolved for non-swarm-scoped networks once
// a node has joined a Swarm cluster.
//
// Regression test for https://github.com/moby/moby/issues/51491.
func TestDNSNamesForNonSwarmScopedNetworks(t *testing.T) {
ctx := setupTest(t)
d := daemon.New(t)
d.StartAndSwarmInit(ctx, t)
defer d.Stop(t)
c := d.NewClientT(t)
defer c.Close()
const bridgeName = "dnsnames-with-swarm"
network.CreateNoError(ctx, t, c, bridgeName)
defer network.RemoveNoError(ctx, t, c, bridgeName)
res := container.RunAttach(ctx, t, c,
container.WithName("test"),
container.WithCmd("nslookup", "-type=a", "test."),
container.WithNetworkMode(bridgeName),
container.WithAutoRemove)
assert.Equal(t, res.ExitCode, 0, "exit code: %d, expected 0; stdout:\n%s", res.ExitCode, res.Stdout)
}

View File

@@ -19,6 +19,7 @@ package sctp
import (
"errors"
"net"
"os"
"runtime"
"syscall"
)
@@ -73,6 +74,10 @@ func listenSCTPExtConfig(network string, laddr *SCTPAddr, options InitMsg, contr
return nil, ErrUnsupported
}
func FileListener(file *os.File) (*SCTPListener, error) {
return nil, ErrUnsupported
}
func (ln *SCTPListener) Accept() (net.Conn, error) {
return nil, ErrUnsupported
}

2
vendor/modules.txt vendored
View File

@@ -756,7 +756,7 @@ github.com/in-toto/in-toto-golang/in_toto/slsa_provenance/v1
# github.com/inconshreveable/mousetrap v1.1.0
## explicit; go 1.18
github.com/inconshreveable/mousetrap
# github.com/ishidawataru/sctp v0.0.0-20250829011129-4b890084db30
# github.com/ishidawataru/sctp v0.0.0-20251114114122-19ddcbc6aae2
## explicit; go 1.12
github.com/ishidawataru/sctp
# github.com/jmoiron/sqlx v1.3.3