From 0b2582dc8fdf92f45a550e72b06410af560f198e Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:25:45 -0700 Subject: [PATCH 01/14] Move internal/metrics to daemon/internal/metrics Signed-off-by: Derek McGowan --- daemon/changes.go | 2 +- daemon/commit.go | 2 +- daemon/container_operations.go | 2 +- daemon/containerd/image_delete.go | 2 +- daemon/containerd/image_history.go | 2 +- daemon/containerd/image_pull.go | 2 +- daemon/containerd/image_push.go | 2 +- daemon/create.go | 2 +- daemon/daemon.go | 2 +- daemon/delete.go | 2 +- daemon/events/events.go | 2 +- daemon/health.go | 2 +- daemon/images/image_delete.go | 2 +- daemon/images/image_history.go | 2 +- daemon/images/image_pull.go | 2 +- daemon/images/image_push.go | 2 +- daemon/info.go | 2 +- {internal => daemon/internal}/metrics/metrics.go | 0 {internal => daemon/internal}/metrics/plugin_unix.go | 0 {internal => daemon/internal}/metrics/plugin_unsupported.go | 0 daemon/monitor.go | 2 +- daemon/start.go | 2 +- 22 files changed, 19 insertions(+), 19 deletions(-) rename {internal => daemon/internal}/metrics/metrics.go (100%) rename {internal => daemon/internal}/metrics/plugin_unix.go (100%) rename {internal => daemon/internal}/metrics/plugin_unsupported.go (100%) diff --git a/daemon/changes.go b/daemon/changes.go index 0e8606580f..d254e3ee2a 100644 --- a/daemon/changes.go +++ b/daemon/changes.go @@ -5,7 +5,7 @@ import ( "errors" "time" - "github.com/docker/docker/internal/metrics" + "github.com/docker/docker/daemon/internal/metrics" "github.com/moby/go-archive" ) diff --git a/daemon/commit.go b/daemon/commit.go index 20ef2eba4a..8795071e7f 100644 --- a/daemon/commit.go +++ b/daemon/commit.go @@ -12,8 +12,8 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" "github.com/docker/docker/builder/dockerfile" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" - "github.com/docker/docker/internal/metrics" "github.com/pkg/errors" ) diff --git a/daemon/container_operations.go b/daemon/container_operations.go index bac0051e1d..898cf2293c 100644 --- a/daemon/container_operations.go +++ b/daemon/container_operations.go @@ -20,9 +20,9 @@ import ( networktypes "github.com/docker/docker/api/types/network" "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/daemon/network" "github.com/docker/docker/errdefs" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/internal/multierror" "github.com/docker/docker/internal/sliceutil" "github.com/docker/docker/libnetwork" diff --git a/daemon/containerd/image_delete.go b/daemon/containerd/image_delete.go index ef281020fb..7fcad6ed78 100644 --- a/daemon/containerd/image_delete.go +++ b/daemon/containerd/image_delete.go @@ -18,8 +18,8 @@ import ( imagetypes "github.com/docker/docker/api/types/image" "github.com/docker/docker/container" dimages "github.com/docker/docker/daemon/images" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/image" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/pkg/stringid" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/daemon/containerd/image_history.go b/daemon/containerd/image_history.go index 32afe7d640..e87dd0c626 100644 --- a/daemon/containerd/image_history.go +++ b/daemon/containerd/image_history.go @@ -9,7 +9,7 @@ import ( "github.com/containerd/platforms" "github.com/distribution/reference" imagetype "github.com/docker/docker/api/types/image" - "github.com/docker/docker/internal/metrics" + "github.com/docker/docker/daemon/internal/metrics" "github.com/opencontainers/go-digest" "github.com/opencontainers/image-spec/identity" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/daemon/containerd/image_pull.go b/daemon/containerd/image_pull.go index e8a1500369..ab851a4ddc 100644 --- a/daemon/containerd/image_pull.go +++ b/daemon/containerd/image_pull.go @@ -18,9 +18,9 @@ import ( "github.com/distribution/reference" "github.com/docker/docker/api/types/events" registrytypes "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/distribution" "github.com/docker/docker/errdefs" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/streamformatter" "github.com/docker/docker/pkg/stringid" diff --git a/daemon/containerd/image_push.go b/daemon/containerd/image_push.go index f90a3a5c34..cf4e2b7554 100644 --- a/daemon/containerd/image_push.go +++ b/daemon/containerd/image_push.go @@ -20,8 +20,8 @@ import ( "github.com/docker/docker/api/types/auxprogress" "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/streamformatter" "github.com/opencontainers/go-digest" diff --git a/daemon/create.go b/daemon/create.go index 72cc3e44ef..75cafb33ab 100644 --- a/daemon/create.go +++ b/daemon/create.go @@ -21,9 +21,9 @@ import ( "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/images" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" "github.com/docker/docker/image" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/internal/multierror" "github.com/docker/docker/internal/otelutil" "github.com/docker/docker/runconfig" diff --git a/daemon/daemon.go b/daemon/daemon.go index 2e0a36eb10..729309e555 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -46,6 +46,7 @@ import ( "github.com/docker/docker/daemon/events" _ "github.com/docker/docker/daemon/graphdriver/register" // register graph drivers "github.com/docker/docker/daemon/images" + "github.com/docker/docker/daemon/internal/metrics" dlogger "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/network" "github.com/docker/docker/daemon/snapshotter" @@ -54,7 +55,6 @@ import ( dmetadata "github.com/docker/docker/distribution/metadata" "github.com/docker/docker/dockerversion" "github.com/docker/docker/image" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/layer" libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/libnetwork" diff --git a/daemon/delete.go b/daemon/delete.go index ca3de4b179..0b4b2f31fd 100644 --- a/daemon/delete.go +++ b/daemon/delete.go @@ -14,9 +14,9 @@ import ( "github.com/docker/docker/api/types/events" "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" "github.com/docker/docker/internal/containerfs" - "github.com/docker/docker/internal/metrics" "github.com/opencontainers/selinux/go-selinux" "github.com/pkg/errors" ) diff --git a/daemon/events/events.go b/daemon/events/events.go index 457318c614..b7f06656e4 100644 --- a/daemon/events/events.go +++ b/daemon/events/events.go @@ -5,7 +5,7 @@ import ( "time" eventtypes "github.com/docker/docker/api/types/events" - "github.com/docker/docker/internal/metrics" + "github.com/docker/docker/daemon/internal/metrics" "github.com/moby/pubsub" ) diff --git a/daemon/health.go b/daemon/health.go index 2de86a808d..e3d583b22a 100644 --- a/daemon/health.go +++ b/daemon/health.go @@ -13,7 +13,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" "github.com/docker/docker/container" - "github.com/docker/docker/internal/metrics" + "github.com/docker/docker/daemon/internal/metrics" ) const ( diff --git a/daemon/images/image_delete.go b/daemon/images/image_delete.go index 080880134b..759bdc2498 100644 --- a/daemon/images/image_delete.go +++ b/daemon/images/image_delete.go @@ -11,9 +11,9 @@ import ( "github.com/docker/docker/api/types/events" imagetypes "github.com/docker/docker/api/types/image" "github.com/docker/docker/container" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" "github.com/docker/docker/image" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/pkg/stringid" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" diff --git a/daemon/images/image_history.go b/daemon/images/image_history.go index 1e27862f56..9807520039 100644 --- a/daemon/images/image_history.go +++ b/daemon/images/image_history.go @@ -8,7 +8,7 @@ import ( "github.com/distribution/reference" "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/image" - "github.com/docker/docker/internal/metrics" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/layer" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/daemon/images/image_pull.go b/daemon/images/image_pull.go index ec0b95915c..0486a5e376 100644 --- a/daemon/images/image_pull.go +++ b/daemon/images/image_pull.go @@ -12,9 +12,9 @@ import ( "github.com/distribution/reference" "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/distribution" progressutils "github.com/docker/docker/distribution/utils" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/streamformatter" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/daemon/images/image_push.go b/daemon/images/image_push.go index 774b11ee30..5595cfd553 100644 --- a/daemon/images/image_push.go +++ b/daemon/images/image_push.go @@ -9,9 +9,9 @@ import ( "github.com/docker/distribution/manifest/schema2" "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/distribution" progressutils "github.com/docker/docker/distribution/utils" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/pkg/progress" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/daemon/info.go b/daemon/info.go index b62fd79044..3140236a52 100644 --- a/daemon/info.go +++ b/daemon/info.go @@ -20,9 +20,9 @@ import ( "github.com/docker/docker/daemon/command/debug" "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/internal/filedescriptors" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/daemon/logger" "github.com/docker/docker/dockerversion" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/internal/platform" "github.com/docker/docker/pkg/meminfo" "github.com/docker/docker/pkg/parsers/kernel" diff --git a/internal/metrics/metrics.go b/daemon/internal/metrics/metrics.go similarity index 100% rename from internal/metrics/metrics.go rename to daemon/internal/metrics/metrics.go diff --git a/internal/metrics/plugin_unix.go b/daemon/internal/metrics/plugin_unix.go similarity index 100% rename from internal/metrics/plugin_unix.go rename to daemon/internal/metrics/plugin_unix.go diff --git a/internal/metrics/plugin_unsupported.go b/daemon/internal/metrics/plugin_unsupported.go similarity index 100% rename from internal/metrics/plugin_unsupported.go rename to daemon/internal/metrics/plugin_unsupported.go diff --git a/daemon/monitor.go b/daemon/monitor.go index f18d5692e8..81d6b79f3e 100644 --- a/daemon/monitor.go +++ b/daemon/monitor.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/api/types/events" "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" - "github.com/docker/docker/internal/metrics" + "github.com/docker/docker/daemon/internal/metrics" libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/restartmanager" "github.com/pkg/errors" diff --git a/daemon/start.go b/daemon/start.go index a914a0fe31..28096bcaad 100644 --- a/daemon/start.go +++ b/daemon/start.go @@ -11,8 +11,8 @@ import ( "github.com/docker/docker/api/types/events" "github.com/docker/docker/container" mobyc8dstore "github.com/docker/docker/daemon/containerd" + "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" - "github.com/docker/docker/internal/metrics" "github.com/docker/docker/internal/otelutil" "github.com/docker/docker/libcontainerd" "github.com/pkg/errors" From f5ceed8719b4ca240cc1ee7022a83e4e76cde9e9 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:26:01 -0700 Subject: [PATCH 02/14] Move plugin/executor/containerd to daemon/internal/plugin/executor/containerd Signed-off-by: Derek McGowan --- daemon/daemon.go | 2 +- .../internal/plugin}/executor/containerd/containerd.go | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {plugin => daemon/internal/plugin}/executor/containerd/containerd.go (100%) diff --git a/daemon/daemon.go b/daemon/daemon.go index 729309e555..d0d4159be7 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -47,6 +47,7 @@ import ( _ "github.com/docker/docker/daemon/graphdriver/register" // register graph drivers "github.com/docker/docker/daemon/images" "github.com/docker/docker/daemon/internal/metrics" + pluginexec "github.com/docker/docker/daemon/internal/plugin/executor/containerd" dlogger "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/network" "github.com/docker/docker/daemon/snapshotter" @@ -68,7 +69,6 @@ import ( "github.com/docker/docker/pkg/plugingetter" "github.com/docker/docker/pkg/sysinfo" "github.com/docker/docker/plugin" - pluginexec "github.com/docker/docker/plugin/executor/containerd" refstore "github.com/docker/docker/reference" "github.com/docker/docker/registry" volumesservice "github.com/docker/docker/volume/service" diff --git a/plugin/executor/containerd/containerd.go b/daemon/internal/plugin/executor/containerd/containerd.go similarity index 100% rename from plugin/executor/containerd/containerd.go rename to daemon/internal/plugin/executor/containerd/containerd.go From 1c700c876f764de8c88f05c849d69ba3c894128c Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:26:17 -0700 Subject: [PATCH 03/14] Move plugin/v2 to daemon/pkg/plugin/v2 Signed-off-by: Derek McGowan --- daemon/cluster/controllers/plugin/controller.go | 2 +- daemon/cluster/controllers/plugin/controller_test.go | 2 +- {plugin => daemon/pkg/plugin}/v2/plugin.go | 0 {plugin => daemon/pkg/plugin}/v2/plugin_linux.go | 0 {plugin => daemon/pkg/plugin}/v2/plugin_unsupported.go | 0 {plugin => daemon/pkg/plugin}/v2/settable.go | 0 {plugin => daemon/pkg/plugin}/v2/settable_test.go | 0 plugin/backend_linux.go | 2 +- plugin/defs.go | 2 +- plugin/manager.go | 2 +- plugin/manager_linux.go | 2 +- plugin/manager_linux_test.go | 2 +- plugin/manager_windows.go | 2 +- plugin/store.go | 2 +- plugin/store_test.go | 2 +- 15 files changed, 10 insertions(+), 10 deletions(-) rename {plugin => daemon/pkg/plugin}/v2/plugin.go (100%) rename {plugin => daemon/pkg/plugin}/v2/plugin_linux.go (100%) rename {plugin => daemon/pkg/plugin}/v2/plugin_unsupported.go (100%) rename {plugin => daemon/pkg/plugin}/v2/settable.go (100%) rename {plugin => daemon/pkg/plugin}/v2/settable_test.go (100%) diff --git a/daemon/cluster/controllers/plugin/controller.go b/daemon/cluster/controllers/plugin/controller.go index 6420321983..45069a546f 100644 --- a/daemon/cluster/controllers/plugin/controller.go +++ b/daemon/cluster/controllers/plugin/controller.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm/runtime" + v2 "github.com/docker/docker/daemon/pkg/plugin/v2" "github.com/docker/docker/plugin" - v2 "github.com/docker/docker/plugin/v2" "github.com/gogo/protobuf/proto" "github.com/moby/swarmkit/v2/api" "github.com/pkg/errors" diff --git a/daemon/cluster/controllers/plugin/controller_test.go b/daemon/cluster/controllers/plugin/controller_test.go index 28ca16fa97..8d0911c322 100644 --- a/daemon/cluster/controllers/plugin/controller_test.go +++ b/daemon/cluster/controllers/plugin/controller_test.go @@ -15,8 +15,8 @@ import ( "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm/runtime" + v2 "github.com/docker/docker/daemon/pkg/plugin/v2" "github.com/docker/docker/plugin" - v2 "github.com/docker/docker/plugin/v2" "github.com/moby/pubsub" "github.com/sirupsen/logrus" ) diff --git a/plugin/v2/plugin.go b/daemon/pkg/plugin/v2/plugin.go similarity index 100% rename from plugin/v2/plugin.go rename to daemon/pkg/plugin/v2/plugin.go diff --git a/plugin/v2/plugin_linux.go b/daemon/pkg/plugin/v2/plugin_linux.go similarity index 100% rename from plugin/v2/plugin_linux.go rename to daemon/pkg/plugin/v2/plugin_linux.go diff --git a/plugin/v2/plugin_unsupported.go b/daemon/pkg/plugin/v2/plugin_unsupported.go similarity index 100% rename from plugin/v2/plugin_unsupported.go rename to daemon/pkg/plugin/v2/plugin_unsupported.go diff --git a/plugin/v2/settable.go b/daemon/pkg/plugin/v2/settable.go similarity index 100% rename from plugin/v2/settable.go rename to daemon/pkg/plugin/v2/settable.go diff --git a/plugin/v2/settable_test.go b/daemon/pkg/plugin/v2/settable_test.go similarity index 100% rename from plugin/v2/settable_test.go rename to daemon/pkg/plugin/v2/settable_test.go diff --git a/plugin/backend_linux.go b/plugin/backend_linux.go index 7e15c8b170..525032e236 100644 --- a/plugin/backend_linux.go +++ b/plugin/backend_linux.go @@ -27,6 +27,7 @@ import ( "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/registry" + v2 "github.com/docker/docker/daemon/pkg/plugin/v2" "github.com/docker/docker/dockerversion" "github.com/docker/docker/errdefs" "github.com/docker/docker/internal/containerfs" @@ -34,7 +35,6 @@ import ( "github.com/docker/docker/pkg/pools" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/stringid" - v2 "github.com/docker/docker/plugin/v2" "github.com/moby/go-archive/chrootarchive" "github.com/moby/sys/mount" "github.com/opencontainers/go-digest" diff --git a/plugin/defs.go b/plugin/defs.go index b37f5ee9d8..4c564bedb5 100644 --- a/plugin/defs.go +++ b/plugin/defs.go @@ -4,8 +4,8 @@ import ( "strings" "sync" + v2 "github.com/docker/docker/daemon/pkg/plugin/v2" "github.com/docker/docker/pkg/plugins" - v2 "github.com/docker/docker/plugin/v2" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/plugin/manager.go b/plugin/manager.go index 0a07339561..47fdbcec50 100644 --- a/plugin/manager.go +++ b/plugin/manager.go @@ -17,10 +17,10 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/events" + v2 "github.com/docker/docker/daemon/pkg/plugin/v2" "github.com/docker/docker/internal/containerfs" "github.com/docker/docker/internal/lazyregexp" "github.com/docker/docker/pkg/authorization" - v2 "github.com/docker/docker/plugin/v2" "github.com/docker/docker/registry" "github.com/moby/pubsub" "github.com/moby/sys/atomicwriter" diff --git a/plugin/manager_linux.go b/plugin/manager_linux.go index ef5a17dfa4..54accd8821 100644 --- a/plugin/manager_linux.go +++ b/plugin/manager_linux.go @@ -12,10 +12,10 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types" "github.com/docker/docker/daemon/initlayer" + v2 "github.com/docker/docker/daemon/pkg/plugin/v2" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/plugins" "github.com/docker/docker/pkg/stringid" - v2 "github.com/docker/docker/plugin/v2" "github.com/moby/sys/mount" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/plugin/manager_linux_test.go b/plugin/manager_linux_test.go index 7a3cfade13..0b91fa55ed 100644 --- a/plugin/manager_linux_test.go +++ b/plugin/manager_linux_test.go @@ -11,9 +11,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/events" + v2 "github.com/docker/docker/daemon/pkg/plugin/v2" "github.com/docker/docker/internal/containerfs" "github.com/docker/docker/pkg/stringid" - v2 "github.com/docker/docker/plugin/v2" "github.com/moby/sys/mount" "github.com/moby/sys/mountinfo" "github.com/opencontainers/runtime-spec/specs-go" diff --git a/plugin/manager_windows.go b/plugin/manager_windows.go index 350f14fce4..db57cf2b65 100644 --- a/plugin/manager_windows.go +++ b/plugin/manager_windows.go @@ -3,7 +3,7 @@ package plugin import ( "fmt" - v2 "github.com/docker/docker/plugin/v2" + v2 "github.com/docker/docker/daemon/pkg/plugin/v2" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/plugin/store.go b/plugin/store.go index a68f2f2ff1..8f4e56d0d5 100644 --- a/plugin/store.go +++ b/plugin/store.go @@ -7,10 +7,10 @@ import ( "github.com/containerd/log" "github.com/distribution/reference" + v2 "github.com/docker/docker/daemon/pkg/plugin/v2" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/plugingetter" "github.com/docker/docker/pkg/plugins" - v2 "github.com/docker/docker/plugin/v2" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) diff --git a/plugin/store_test.go b/plugin/store_test.go index d0896c60d4..d92e96083c 100644 --- a/plugin/store_test.go +++ b/plugin/store_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/docker/docker/api/types" + v2 "github.com/docker/docker/daemon/pkg/plugin/v2" "github.com/docker/docker/pkg/plugingetter" - v2 "github.com/docker/docker/plugin/v2" ) func TestFilterByCapNeg(t *testing.T) { From 3581b982f771f8fc527cf21069a1c243ceda2b49 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:26:33 -0700 Subject: [PATCH 04/14] Move plugin to daemon/pkg/plugin Signed-off-by: Derek McGowan --- daemon/cluster/controllers/plugin/controller.go | 2 +- daemon/cluster/controllers/plugin/controller_test.go | 2 +- daemon/cluster/executor/backend.go | 2 +- daemon/command/daemon.go | 2 +- daemon/daemon.go | 2 +- daemon/internal/metrics/plugin_unix.go | 2 +- daemon/internal/metrics/plugin_unsupported.go | 2 +- {plugin => daemon/pkg/plugin}/backend_linux.go | 0 {plugin => daemon/pkg/plugin}/backend_linux_test.go | 0 {plugin => daemon/pkg/plugin}/backend_unsupported.go | 0 {plugin => daemon/pkg/plugin}/defs.go | 0 {plugin => daemon/pkg/plugin}/errors.go | 0 {plugin => daemon/pkg/plugin}/events.go | 0 {plugin => daemon/pkg/plugin}/fetch_linux.go | 0 {plugin => daemon/pkg/plugin}/manager.go | 0 {plugin => daemon/pkg/plugin}/manager_linux.go | 0 {plugin => daemon/pkg/plugin}/manager_linux_test.go | 0 {plugin => daemon/pkg/plugin}/manager_test.go | 0 {plugin => daemon/pkg/plugin}/manager_windows.go | 0 {plugin => daemon/pkg/plugin}/progress.go | 0 {plugin => daemon/pkg/plugin}/registry.go | 0 {plugin => daemon/pkg/plugin}/store.go | 0 {plugin => daemon/pkg/plugin}/store_test.go | 0 daemon/server/router/plugin/backend.go | 2 +- testutil/fixtures/plugin/plugin.go | 2 +- 25 files changed, 9 insertions(+), 9 deletions(-) rename {plugin => daemon/pkg/plugin}/backend_linux.go (100%) rename {plugin => daemon/pkg/plugin}/backend_linux_test.go (100%) rename {plugin => daemon/pkg/plugin}/backend_unsupported.go (100%) rename {plugin => daemon/pkg/plugin}/defs.go (100%) rename {plugin => daemon/pkg/plugin}/errors.go (100%) rename {plugin => daemon/pkg/plugin}/events.go (100%) rename {plugin => daemon/pkg/plugin}/fetch_linux.go (100%) rename {plugin => daemon/pkg/plugin}/manager.go (100%) rename {plugin => daemon/pkg/plugin}/manager_linux.go (100%) rename {plugin => daemon/pkg/plugin}/manager_linux_test.go (100%) rename {plugin => daemon/pkg/plugin}/manager_test.go (100%) rename {plugin => daemon/pkg/plugin}/manager_windows.go (100%) rename {plugin => daemon/pkg/plugin}/progress.go (100%) rename {plugin => daemon/pkg/plugin}/registry.go (100%) rename {plugin => daemon/pkg/plugin}/store.go (100%) rename {plugin => daemon/pkg/plugin}/store_test.go (100%) diff --git a/daemon/cluster/controllers/plugin/controller.go b/daemon/cluster/controllers/plugin/controller.go index 45069a546f..f5a0ce1059 100644 --- a/daemon/cluster/controllers/plugin/controller.go +++ b/daemon/cluster/controllers/plugin/controller.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm/runtime" + "github.com/docker/docker/daemon/pkg/plugin" v2 "github.com/docker/docker/daemon/pkg/plugin/v2" - "github.com/docker/docker/plugin" "github.com/gogo/protobuf/proto" "github.com/moby/swarmkit/v2/api" "github.com/pkg/errors" diff --git a/daemon/cluster/controllers/plugin/controller_test.go b/daemon/cluster/controllers/plugin/controller_test.go index 8d0911c322..ed94942616 100644 --- a/daemon/cluster/controllers/plugin/controller_test.go +++ b/daemon/cluster/controllers/plugin/controller_test.go @@ -15,8 +15,8 @@ import ( "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm/runtime" + "github.com/docker/docker/daemon/pkg/plugin" v2 "github.com/docker/docker/daemon/pkg/plugin/v2" - "github.com/docker/docker/plugin" "github.com/moby/pubsub" "github.com/sirupsen/logrus" ) diff --git a/daemon/cluster/executor/backend.go b/daemon/cluster/executor/backend.go index 810537902c..4c1916f53d 100644 --- a/daemon/cluster/executor/backend.go +++ b/daemon/cluster/executor/backend.go @@ -18,11 +18,11 @@ import ( "github.com/docker/docker/api/types/volume" clustertypes "github.com/docker/docker/daemon/cluster/provider" networkSettings "github.com/docker/docker/daemon/network" + "github.com/docker/docker/daemon/pkg/plugin" "github.com/docker/docker/image" "github.com/docker/docker/libnetwork" "github.com/docker/docker/libnetwork/cluster" networktypes "github.com/docker/docker/libnetwork/types" - "github.com/docker/docker/plugin" volumeopts "github.com/docker/docker/volume/service/opts" "github.com/moby/swarmkit/v2/agent/exec" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/daemon/command/daemon.go b/daemon/command/daemon.go index 6d6f45d630..e88d632550 100644 --- a/daemon/command/daemon.go +++ b/daemon/command/daemon.go @@ -29,6 +29,7 @@ import ( "github.com/docker/docker/daemon/command/trap" "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/listeners" + "github.com/docker/docker/daemon/pkg/plugin" apiserver "github.com/docker/docker/daemon/server" "github.com/docker/docker/daemon/server/middleware" "github.com/docker/docker/daemon/server/router" @@ -55,7 +56,6 @@ import ( "github.com/docker/docker/pkg/plugingetter" "github.com/docker/docker/pkg/rootless" "github.com/docker/docker/pkg/sysinfo" - "github.com/docker/docker/plugin" "github.com/docker/docker/runconfig" "github.com/docker/go-connections/tlsconfig" "github.com/moby/buildkit/session" diff --git a/daemon/daemon.go b/daemon/daemon.go index d0d4159be7..d9628bc36c 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -50,6 +50,7 @@ import ( pluginexec "github.com/docker/docker/daemon/internal/plugin/executor/containerd" dlogger "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/network" + "github.com/docker/docker/daemon/pkg/plugin" "github.com/docker/docker/daemon/snapshotter" "github.com/docker/docker/daemon/stats" "github.com/docker/docker/distribution" @@ -68,7 +69,6 @@ import ( "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/plugingetter" "github.com/docker/docker/pkg/sysinfo" - "github.com/docker/docker/plugin" refstore "github.com/docker/docker/reference" "github.com/docker/docker/registry" volumesservice "github.com/docker/docker/volume/service" diff --git a/daemon/internal/metrics/plugin_unix.go b/daemon/internal/metrics/plugin_unix.go index 4ac00880ea..ebc965b396 100644 --- a/daemon/internal/metrics/plugin_unix.go +++ b/daemon/internal/metrics/plugin_unix.go @@ -12,9 +12,9 @@ import ( "time" "github.com/containerd/log" + "github.com/docker/docker/daemon/pkg/plugin" "github.com/docker/docker/pkg/plugingetter" "github.com/docker/docker/pkg/plugins" - "github.com/docker/docker/plugin" gometrics "github.com/docker/go-metrics" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" diff --git a/daemon/internal/metrics/plugin_unsupported.go b/daemon/internal/metrics/plugin_unsupported.go index 472e674fbd..4bf64dc447 100644 --- a/daemon/internal/metrics/plugin_unsupported.go +++ b/daemon/internal/metrics/plugin_unsupported.go @@ -3,8 +3,8 @@ package metrics import ( + "github.com/docker/docker/daemon/pkg/plugin" "github.com/docker/docker/pkg/plugingetter" - "github.com/docker/docker/plugin" ) func RegisterPlugin(*plugin.Store, string) error { return nil } diff --git a/plugin/backend_linux.go b/daemon/pkg/plugin/backend_linux.go similarity index 100% rename from plugin/backend_linux.go rename to daemon/pkg/plugin/backend_linux.go diff --git a/plugin/backend_linux_test.go b/daemon/pkg/plugin/backend_linux_test.go similarity index 100% rename from plugin/backend_linux_test.go rename to daemon/pkg/plugin/backend_linux_test.go diff --git a/plugin/backend_unsupported.go b/daemon/pkg/plugin/backend_unsupported.go similarity index 100% rename from plugin/backend_unsupported.go rename to daemon/pkg/plugin/backend_unsupported.go diff --git a/plugin/defs.go b/daemon/pkg/plugin/defs.go similarity index 100% rename from plugin/defs.go rename to daemon/pkg/plugin/defs.go diff --git a/plugin/errors.go b/daemon/pkg/plugin/errors.go similarity index 100% rename from plugin/errors.go rename to daemon/pkg/plugin/errors.go diff --git a/plugin/events.go b/daemon/pkg/plugin/events.go similarity index 100% rename from plugin/events.go rename to daemon/pkg/plugin/events.go diff --git a/plugin/fetch_linux.go b/daemon/pkg/plugin/fetch_linux.go similarity index 100% rename from plugin/fetch_linux.go rename to daemon/pkg/plugin/fetch_linux.go diff --git a/plugin/manager.go b/daemon/pkg/plugin/manager.go similarity index 100% rename from plugin/manager.go rename to daemon/pkg/plugin/manager.go diff --git a/plugin/manager_linux.go b/daemon/pkg/plugin/manager_linux.go similarity index 100% rename from plugin/manager_linux.go rename to daemon/pkg/plugin/manager_linux.go diff --git a/plugin/manager_linux_test.go b/daemon/pkg/plugin/manager_linux_test.go similarity index 100% rename from plugin/manager_linux_test.go rename to daemon/pkg/plugin/manager_linux_test.go diff --git a/plugin/manager_test.go b/daemon/pkg/plugin/manager_test.go similarity index 100% rename from plugin/manager_test.go rename to daemon/pkg/plugin/manager_test.go diff --git a/plugin/manager_windows.go b/daemon/pkg/plugin/manager_windows.go similarity index 100% rename from plugin/manager_windows.go rename to daemon/pkg/plugin/manager_windows.go diff --git a/plugin/progress.go b/daemon/pkg/plugin/progress.go similarity index 100% rename from plugin/progress.go rename to daemon/pkg/plugin/progress.go diff --git a/plugin/registry.go b/daemon/pkg/plugin/registry.go similarity index 100% rename from plugin/registry.go rename to daemon/pkg/plugin/registry.go diff --git a/plugin/store.go b/daemon/pkg/plugin/store.go similarity index 100% rename from plugin/store.go rename to daemon/pkg/plugin/store.go diff --git a/plugin/store_test.go b/daemon/pkg/plugin/store_test.go similarity index 100% rename from plugin/store_test.go rename to daemon/pkg/plugin/store_test.go diff --git a/daemon/server/router/plugin/backend.go b/daemon/server/router/plugin/backend.go index 1d0839417f..dcce3e8c4d 100644 --- a/daemon/server/router/plugin/backend.go +++ b/daemon/server/router/plugin/backend.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/registry" - "github.com/docker/docker/plugin" + "github.com/docker/docker/daemon/pkg/plugin" ) // Backend for Plugin diff --git a/testutil/fixtures/plugin/plugin.go b/testutil/fixtures/plugin/plugin.go index a7b73a7aca..2556943b40 100644 --- a/testutil/fixtures/plugin/plugin.go +++ b/testutil/fixtures/plugin/plugin.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/registry" - "github.com/docker/docker/plugin" + "github.com/docker/docker/daemon/pkg/plugin" registrypkg "github.com/docker/docker/registry" "github.com/moby/go-archive" "github.com/pkg/errors" From 9d9cb00d5056503ddf30ebf811b95ba4831e3a6f Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:26:49 -0700 Subject: [PATCH 05/14] Move container/stream/bytespipe to daemon/internal/stream/bytespipe Signed-off-by: Derek McGowan --- container/stream/streams.go | 2 +- {container => daemon/internal}/stream/bytespipe/buffer.go | 0 {container => daemon/internal}/stream/bytespipe/buffer_test.go | 0 {container => daemon/internal}/stream/bytespipe/bytespipe.go | 0 .../internal}/stream/bytespipe/bytespipe_test.go | 0 5 files changed, 1 insertion(+), 1 deletion(-) rename {container => daemon/internal}/stream/bytespipe/buffer.go (100%) rename {container => daemon/internal}/stream/bytespipe/buffer_test.go (100%) rename {container => daemon/internal}/stream/bytespipe/bytespipe.go (100%) rename {container => daemon/internal}/stream/bytespipe/bytespipe_test.go (100%) diff --git a/container/stream/streams.go b/container/stream/streams.go index f9ada1002f..f2d097a6cc 100644 --- a/container/stream/streams.go +++ b/container/stream/streams.go @@ -10,7 +10,7 @@ import ( "github.com/containerd/containerd/v2/pkg/cio" "github.com/containerd/log" - "github.com/docker/docker/container/stream/bytespipe" + "github.com/docker/docker/daemon/internal/stream/bytespipe" "github.com/docker/docker/pkg/pools" ) diff --git a/container/stream/bytespipe/buffer.go b/daemon/internal/stream/bytespipe/buffer.go similarity index 100% rename from container/stream/bytespipe/buffer.go rename to daemon/internal/stream/bytespipe/buffer.go diff --git a/container/stream/bytespipe/buffer_test.go b/daemon/internal/stream/bytespipe/buffer_test.go similarity index 100% rename from container/stream/bytespipe/buffer_test.go rename to daemon/internal/stream/bytespipe/buffer_test.go diff --git a/container/stream/bytespipe/bytespipe.go b/daemon/internal/stream/bytespipe/bytespipe.go similarity index 100% rename from container/stream/bytespipe/bytespipe.go rename to daemon/internal/stream/bytespipe/bytespipe.go diff --git a/container/stream/bytespipe/bytespipe_test.go b/daemon/internal/stream/bytespipe/bytespipe_test.go similarity index 100% rename from container/stream/bytespipe/bytespipe_test.go rename to daemon/internal/stream/bytespipe/bytespipe_test.go From a02ba3c7df2ac0404eefbde622f7a61adf0290fb Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:27:05 -0700 Subject: [PATCH 06/14] Move container/stream to daemon/internal/stream Signed-off-by: Derek McGowan --- container/container.go | 2 +- container/exec.go | 2 +- daemon/attach.go | 2 +- daemon/exec.go | 2 +- {container => daemon/internal}/stream/attach.go | 0 {container => daemon/internal}/stream/attach_test.go | 0 {container => daemon/internal}/stream/streams.go | 0 {container => daemon/internal}/stream/unbuffered.go | 0 {container => daemon/internal}/stream/unbuffered_test.go | 0 9 files changed, 4 insertions(+), 4 deletions(-) rename {container => daemon/internal}/stream/attach.go (100%) rename {container => daemon/internal}/stream/attach_test.go (100%) rename {container => daemon/internal}/stream/streams.go (100%) rename {container => daemon/internal}/stream/unbuffered.go (100%) rename {container => daemon/internal}/stream/unbuffered_test.go (100%) diff --git a/container/container.go b/container/container.go index ef0957f8a9..ee145d8986 100644 --- a/container/container.go +++ b/container/container.go @@ -21,7 +21,7 @@ import ( "github.com/docker/docker/api/types/events" mounttypes "github.com/docker/docker/api/types/mount" swarmtypes "github.com/docker/docker/api/types/swarm" - "github.com/docker/docker/container/stream" + "github.com/docker/docker/daemon/internal/stream" "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger/jsonfilelog" "github.com/docker/docker/daemon/logger/local" diff --git a/container/exec.go b/container/exec.go index e94f85f57e..5695493e96 100644 --- a/container/exec.go +++ b/container/exec.go @@ -7,7 +7,7 @@ import ( "github.com/containerd/containerd/v2/pkg/cio" "github.com/containerd/log" - "github.com/docker/docker/container/stream" + "github.com/docker/docker/daemon/internal/stream" "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/pkg/stringid" ) diff --git a/daemon/attach.go b/daemon/attach.go index c4c0b1a517..09bc45bb0b 100644 --- a/daemon/attach.go +++ b/daemon/attach.go @@ -10,7 +10,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" "github.com/docker/docker/container" - "github.com/docker/docker/container/stream" + "github.com/docker/docker/daemon/internal/stream" "github.com/docker/docker/daemon/logger" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/stdcopy" diff --git a/daemon/exec.go b/daemon/exec.go index 41678b4184..31bc8d01d4 100644 --- a/daemon/exec.go +++ b/daemon/exec.go @@ -15,7 +15,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" "github.com/docker/docker/container" - "github.com/docker/docker/container/stream" + "github.com/docker/docker/daemon/internal/stream" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/pools" "github.com/moby/sys/signal" diff --git a/container/stream/attach.go b/daemon/internal/stream/attach.go similarity index 100% rename from container/stream/attach.go rename to daemon/internal/stream/attach.go diff --git a/container/stream/attach_test.go b/daemon/internal/stream/attach_test.go similarity index 100% rename from container/stream/attach_test.go rename to daemon/internal/stream/attach_test.go diff --git a/container/stream/streams.go b/daemon/internal/stream/streams.go similarity index 100% rename from container/stream/streams.go rename to daemon/internal/stream/streams.go diff --git a/container/stream/unbuffered.go b/daemon/internal/stream/unbuffered.go similarity index 100% rename from container/stream/unbuffered.go rename to daemon/internal/stream/unbuffered.go diff --git a/container/stream/unbuffered_test.go b/daemon/internal/stream/unbuffered_test.go similarity index 100% rename from container/stream/unbuffered_test.go rename to daemon/internal/stream/unbuffered_test.go From 5419eb1efc01aa36191ac066f43a568579c78f5a Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:27:21 -0700 Subject: [PATCH 07/14] Move container to daemon/container Signed-off-by: Derek McGowan --- daemon/archive_tarcopyoptions_unix.go | 2 +- daemon/archive_unix.go | 2 +- daemon/archive_windows.go | 2 +- daemon/attach.go | 2 +- daemon/cluster/executor/container/health_test.go | 2 +- daemon/container.go | 2 +- {container => daemon/container}/archive_windows.go | 0 {container => daemon/container}/attach_context.go | 0 {container => daemon/container}/container.go | 0 {container => daemon/container}/container_test.go | 0 {container => daemon/container}/container_unix.go | 0 {container => daemon/container}/container_windows.go | 0 {container => daemon/container}/env.go | 0 {container => daemon/container}/env_test.go | 0 {container => daemon/container}/exec.go | 0 {container => daemon/container}/health.go | 0 {container => daemon/container}/history.go | 0 {container => daemon/container}/memory_store.go | 0 {container => daemon/container}/memory_store_test.go | 0 {container => daemon/container}/monitor.go | 0 {container => daemon/container}/mounts_unix.go | 0 {container => daemon/container}/mounts_windows.go | 0 {container => daemon/container}/rwlayer.go | 0 {container => daemon/container}/state.go | 0 {container => daemon/container}/state_test.go | 0 {container => daemon/container}/store.go | 0 {container => daemon/container}/view.go | 0 {container => daemon/container}/view_test.go | 0 daemon/container_linux.go | 2 +- daemon/container_operations.go | 2 +- daemon/container_operations_test.go | 2 +- daemon/container_operations_unix.go | 2 +- daemon/container_operations_windows.go | 2 +- daemon/container_windows.go | 2 +- daemon/containerd/fake_service_test.go | 2 +- daemon/containerd/image_changes.go | 2 +- daemon/containerd/image_delete.go | 2 +- daemon/containerd/image_delete_test.go | 2 +- daemon/containerd/image_list_test.go | 2 +- daemon/containerd/image_prune.go | 2 +- daemon/containerd/image_snapshot.go | 2 +- daemon/containerd/service.go | 2 +- daemon/containerd/service_unix.go | 2 +- daemon/containerd/service_windows.go | 2 +- daemon/containerfs_linux.go | 2 +- daemon/create.go | 2 +- daemon/create_unix.go | 2 +- daemon/create_windows.go | 2 +- daemon/daemon.go | 2 +- daemon/daemon_test.go | 2 +- daemon/daemon_unix.go | 2 +- daemon/daemon_unix_test.go | 2 +- daemon/daemon_windows.go | 2 +- daemon/delete.go | 2 +- daemon/delete_test.go | 2 +- daemon/events.go | 2 +- daemon/events_test.go | 2 +- daemon/exec.go | 2 +- daemon/exec_linux.go | 2 +- daemon/exec_linux_test.go | 2 +- daemon/exec_windows.go | 2 +- daemon/export.go | 2 +- daemon/health.go | 2 +- daemon/health_test.go | 2 +- daemon/image_service.go | 2 +- daemon/images/image_changes.go | 2 +- daemon/images/image_delete.go | 2 +- daemon/images/image_list.go | 2 +- daemon/images/image_unix.go | 2 +- daemon/images/image_windows.go | 2 +- daemon/images/service.go | 2 +- daemon/inspect.go | 2 +- daemon/inspect_linux.go | 2 +- daemon/inspect_test.go | 2 +- daemon/inspect_windows.go | 2 +- daemon/kill.go | 2 +- daemon/links.go | 2 +- daemon/list.go | 2 +- daemon/list_test.go | 2 +- daemon/list_unix.go | 2 +- daemon/list_windows.go | 2 +- daemon/logs.go | 2 +- daemon/migration.go | 2 +- daemon/migration_test.go | 2 +- daemon/monitor.go | 2 +- daemon/mounts.go | 2 +- daemon/names.go | 2 +- daemon/network.go | 2 +- daemon/oci_linux.go | 2 +- daemon/oci_linux_test.go | 2 +- daemon/oci_opts.go | 2 +- daemon/oci_utils.go | 2 +- daemon/oci_windows.go | 2 +- daemon/oci_windows_test.go | 2 +- daemon/pause.go | 2 +- daemon/rename.go | 2 +- daemon/resize_test.go | 2 +- daemon/restart.go | 2 +- daemon/seccomp_linux.go | 2 +- daemon/seccomp_linux_test.go | 2 +- daemon/seccomp_unsupported.go | 2 +- daemon/start.go | 2 +- daemon/start_linux.go | 2 +- daemon/start_notlinux.go | 2 +- daemon/start_unix.go | 2 +- daemon/start_windows.go | 2 +- daemon/stats.go | 2 +- daemon/stats/collector.go | 2 +- daemon/stats_unix.go | 2 +- daemon/stats_windows.go | 2 +- daemon/stop.go | 2 +- daemon/unpause.go | 2 +- daemon/volumes.go | 2 +- daemon/volumes_unix.go | 2 +- daemon/volumes_windows.go | 2 +- integration/container/daemon_linux_test.go | 2 +- testutil/daemon/daemon.go | 2 +- 117 files changed, 95 insertions(+), 95 deletions(-) rename {container => daemon/container}/archive_windows.go (100%) rename {container => daemon/container}/attach_context.go (100%) rename {container => daemon/container}/container.go (100%) rename {container => daemon/container}/container_test.go (100%) rename {container => daemon/container}/container_unix.go (100%) rename {container => daemon/container}/container_windows.go (100%) rename {container => daemon/container}/env.go (100%) rename {container => daemon/container}/env_test.go (100%) rename {container => daemon/container}/exec.go (100%) rename {container => daemon/container}/health.go (100%) rename {container => daemon/container}/history.go (100%) rename {container => daemon/container}/memory_store.go (100%) rename {container => daemon/container}/memory_store_test.go (100%) rename {container => daemon/container}/monitor.go (100%) rename {container => daemon/container}/mounts_unix.go (100%) rename {container => daemon/container}/mounts_windows.go (100%) rename {container => daemon/container}/rwlayer.go (100%) rename {container => daemon/container}/state.go (100%) rename {container => daemon/container}/state_test.go (100%) rename {container => daemon/container}/store.go (100%) rename {container => daemon/container}/view.go (100%) rename {container => daemon/container}/view_test.go (100%) diff --git a/daemon/archive_tarcopyoptions_unix.go b/daemon/archive_tarcopyoptions_unix.go index d08bc42ac9..86b77a5e2a 100644 --- a/daemon/archive_tarcopyoptions_unix.go +++ b/daemon/archive_tarcopyoptions_unix.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/moby/go-archive" "github.com/moby/sys/user" diff --git a/daemon/archive_unix.go b/daemon/archive_unix.go index 08074a3fc6..9fc2241bc7 100644 --- a/daemon/archive_unix.go +++ b/daemon/archive_unix.go @@ -10,7 +10,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/ioutils" volumemounts "github.com/docker/docker/volume/mounts" diff --git a/daemon/archive_windows.go b/daemon/archive_windows.go index 1189cf4ab1..830fb105d0 100644 --- a/daemon/archive_windows.go +++ b/daemon/archive_windows.go @@ -8,7 +8,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/ioutils" "github.com/moby/go-archive" diff --git a/daemon/attach.go b/daemon/attach.go index 09bc45bb0b..4b52e7b920 100644 --- a/daemon/attach.go +++ b/daemon/attach.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types/backend" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/internal/stream" "github.com/docker/docker/daemon/logger" "github.com/docker/docker/errdefs" diff --git a/daemon/cluster/executor/container/health_test.go b/daemon/cluster/executor/container/health_test.go index 0c317e1bd1..e8bc139d73 100644 --- a/daemon/cluster/executor/container/health_test.go +++ b/daemon/cluster/executor/container/health_test.go @@ -10,8 +10,8 @@ import ( containertypes "github.com/docker/docker/api/types/container" eventtypes "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" "github.com/docker/docker/daemon" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/events" "github.com/moby/swarmkit/v2/api" ) diff --git a/daemon/container.go b/daemon/container.go index 22af79c439..7b09c422ab 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -12,8 +12,8 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" networktypes "github.com/docker/docker/api/types/network" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/network" "github.com/docker/docker/errdefs" "github.com/docker/docker/image" diff --git a/container/archive_windows.go b/daemon/container/archive_windows.go similarity index 100% rename from container/archive_windows.go rename to daemon/container/archive_windows.go diff --git a/container/attach_context.go b/daemon/container/attach_context.go similarity index 100% rename from container/attach_context.go rename to daemon/container/attach_context.go diff --git a/container/container.go b/daemon/container/container.go similarity index 100% rename from container/container.go rename to daemon/container/container.go diff --git a/container/container_test.go b/daemon/container/container_test.go similarity index 100% rename from container/container_test.go rename to daemon/container/container_test.go diff --git a/container/container_unix.go b/daemon/container/container_unix.go similarity index 100% rename from container/container_unix.go rename to daemon/container/container_unix.go diff --git a/container/container_windows.go b/daemon/container/container_windows.go similarity index 100% rename from container/container_windows.go rename to daemon/container/container_windows.go diff --git a/container/env.go b/daemon/container/env.go similarity index 100% rename from container/env.go rename to daemon/container/env.go diff --git a/container/env_test.go b/daemon/container/env_test.go similarity index 100% rename from container/env_test.go rename to daemon/container/env_test.go diff --git a/container/exec.go b/daemon/container/exec.go similarity index 100% rename from container/exec.go rename to daemon/container/exec.go diff --git a/container/health.go b/daemon/container/health.go similarity index 100% rename from container/health.go rename to daemon/container/health.go diff --git a/container/history.go b/daemon/container/history.go similarity index 100% rename from container/history.go rename to daemon/container/history.go diff --git a/container/memory_store.go b/daemon/container/memory_store.go similarity index 100% rename from container/memory_store.go rename to daemon/container/memory_store.go diff --git a/container/memory_store_test.go b/daemon/container/memory_store_test.go similarity index 100% rename from container/memory_store_test.go rename to daemon/container/memory_store_test.go diff --git a/container/monitor.go b/daemon/container/monitor.go similarity index 100% rename from container/monitor.go rename to daemon/container/monitor.go diff --git a/container/mounts_unix.go b/daemon/container/mounts_unix.go similarity index 100% rename from container/mounts_unix.go rename to daemon/container/mounts_unix.go diff --git a/container/mounts_windows.go b/daemon/container/mounts_windows.go similarity index 100% rename from container/mounts_windows.go rename to daemon/container/mounts_windows.go diff --git a/container/rwlayer.go b/daemon/container/rwlayer.go similarity index 100% rename from container/rwlayer.go rename to daemon/container/rwlayer.go diff --git a/container/state.go b/daemon/container/state.go similarity index 100% rename from container/state.go rename to daemon/container/state.go diff --git a/container/state_test.go b/daemon/container/state_test.go similarity index 100% rename from container/state_test.go rename to daemon/container/state_test.go diff --git a/container/store.go b/daemon/container/store.go similarity index 100% rename from container/store.go rename to daemon/container/store.go diff --git a/container/view.go b/daemon/container/view.go similarity index 100% rename from container/view.go rename to daemon/container/view.go diff --git a/container/view_test.go b/daemon/container/view_test.go similarity index 100% rename from container/view_test.go rename to daemon/container/view_test.go diff --git a/daemon/container_linux.go b/daemon/container_linux.go index 3b1fc03ee5..5e30088849 100644 --- a/daemon/container_linux.go +++ b/daemon/container_linux.go @@ -3,7 +3,7 @@ package daemon import ( - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" ) diff --git a/daemon/container_operations.go b/daemon/container_operations.go index 898cf2293c..4aeeac846e 100644 --- a/daemon/container_operations.go +++ b/daemon/container_operations.go @@ -18,8 +18,8 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" networktypes "github.com/docker/docker/api/types/network" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/daemon/network" "github.com/docker/docker/errdefs" diff --git a/daemon/container_operations_test.go b/daemon/container_operations_test.go index 9df937dadd..d0936904c8 100644 --- a/daemon/container_operations_test.go +++ b/daemon/container_operations_test.go @@ -6,7 +6,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" networktypes "github.com/docker/docker/api/types/network" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/libnetwork" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" diff --git a/daemon/container_operations_unix.go b/daemon/container_operations_unix.go index 2e39740bfe..1a7f5ded1e 100644 --- a/daemon/container_operations_unix.go +++ b/daemon/container_operations_unix.go @@ -12,8 +12,8 @@ import ( "syscall" "github.com/containerd/log" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/links" "github.com/docker/docker/daemon/network" "github.com/docker/docker/errdefs" diff --git a/daemon/container_operations_windows.go b/daemon/container_operations_windows.go index db6eabe48b..dbc9c51e17 100644 --- a/daemon/container_operations_windows.go +++ b/daemon/container_operations_windows.go @@ -6,8 +6,8 @@ import ( "os" "github.com/containerd/log" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/network" "github.com/docker/docker/libnetwork" "github.com/docker/docker/pkg/system" diff --git a/daemon/container_windows.go b/daemon/container_windows.go index 587ce84125..c9fdfa48d6 100644 --- a/daemon/container_windows.go +++ b/daemon/container_windows.go @@ -1,7 +1,7 @@ package daemon import ( - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" ) func (daemon *Daemon) saveAppArmorConfig(container *container.Container) error { diff --git a/daemon/containerd/fake_service_test.go b/daemon/containerd/fake_service_test.go index 1381216160..e48070174d 100644 --- a/daemon/containerd/fake_service_test.go +++ b/daemon/containerd/fake_service_test.go @@ -16,7 +16,7 @@ import ( "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/defaults" cerrdefs "github.com/containerd/errdefs" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" daemonevents "github.com/docker/docker/daemon/events" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/daemon/containerd/image_changes.go b/daemon/containerd/image_changes.go index ea147ce123..2d2eb731eb 100644 --- a/daemon/containerd/image_changes.go +++ b/daemon/containerd/image_changes.go @@ -6,7 +6,7 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/log" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/pkg/stringid" "github.com/moby/go-archive" ) diff --git a/daemon/containerd/image_delete.go b/daemon/containerd/image_delete.go index 7fcad6ed78..a02dbadb43 100644 --- a/daemon/containerd/image_delete.go +++ b/daemon/containerd/image_delete.go @@ -16,7 +16,7 @@ import ( "github.com/distribution/reference" "github.com/docker/docker/api/types/events" imagetypes "github.com/docker/docker/api/types/image" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" dimages "github.com/docker/docker/daemon/images" "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/image" diff --git a/daemon/containerd/image_delete_test.go b/daemon/containerd/image_delete_test.go index f07202b466..501ec103d6 100644 --- a/daemon/containerd/image_delete_test.go +++ b/daemon/containerd/image_delete_test.go @@ -9,7 +9,7 @@ import ( "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/log/logtest" "github.com/docker/docker/api/types/image" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" daemonevents "github.com/docker/docker/daemon/events" dimages "github.com/docker/docker/daemon/images" "gotest.tools/v3/assert" diff --git a/daemon/containerd/image_list_test.go b/daemon/containerd/image_list_test.go index 00285f6089..bf7b0e4c70 100644 --- a/daemon/containerd/image_list_test.go +++ b/daemon/containerd/image_list_test.go @@ -16,7 +16,7 @@ import ( "github.com/containerd/log/logtest" "github.com/containerd/platforms" imagetypes "github.com/docker/docker/api/types/image" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/internal/testutils/specialimage" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/daemon/containerd/image_prune.go b/daemon/containerd/image_prune.go index 94e3f1a684..7a3e0256d5 100644 --- a/daemon/containerd/image_prune.go +++ b/daemon/containerd/image_prune.go @@ -13,7 +13,7 @@ import ( "github.com/distribution/reference" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/image" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/hashicorp/go-multierror" "github.com/opencontainers/go-digest" diff --git a/daemon/containerd/image_snapshot.go b/daemon/containerd/image_snapshot.go index 0084e2141c..f9aa654e32 100644 --- a/daemon/containerd/image_snapshot.go +++ b/daemon/containerd/image_snapshot.go @@ -11,7 +11,7 @@ import ( "github.com/containerd/containerd/v2/core/snapshots" cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/snapshotter" "github.com/docker/docker/errdefs" "github.com/docker/docker/image" diff --git a/daemon/containerd/service.go b/daemon/containerd/service.go index c2a8a3e187..9fd034b75e 100644 --- a/daemon/containerd/service.go +++ b/daemon/containerd/service.go @@ -14,7 +14,7 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" daemonevents "github.com/docker/docker/daemon/events" dimages "github.com/docker/docker/daemon/images" "github.com/docker/docker/daemon/snapshotter" diff --git a/daemon/containerd/service_unix.go b/daemon/containerd/service_unix.go index 62a451fba5..3a3a028eda 100644 --- a/daemon/containerd/service_unix.go +++ b/daemon/containerd/service_unix.go @@ -3,7 +3,7 @@ package containerd import ( - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/docker/docker/image" "github.com/pkg/errors" diff --git a/daemon/containerd/service_windows.go b/daemon/containerd/service_windows.go index dd8c1a4309..6a2a274a48 100644 --- a/daemon/containerd/service_windows.go +++ b/daemon/containerd/service_windows.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/image" "github.com/pkg/errors" ) diff --git a/daemon/containerfs_linux.go b/daemon/containerfs_linux.go index 3f04a5ba54..0ca3bd395d 100644 --- a/daemon/containerfs_linux.go +++ b/daemon/containerfs_linux.go @@ -16,7 +16,7 @@ import ( "golang.org/x/sys/unix" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/internal/mounttree" "github.com/docker/docker/internal/unshare" "github.com/docker/docker/pkg/fileutils" diff --git a/daemon/create.go b/daemon/create.go index 75cafb33ab..b3cc2216e2 100644 --- a/daemon/create.go +++ b/daemon/create.go @@ -18,8 +18,8 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" networktypes "github.com/docker/docker/api/types/network" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/images" "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" diff --git a/daemon/create_unix.go b/daemon/create_unix.go index a57154cc05..bf50971d1d 100644 --- a/daemon/create_unix.go +++ b/daemon/create_unix.go @@ -12,7 +12,7 @@ import ( "github.com/containerd/log" containertypes "github.com/docker/docker/api/types/container" mounttypes "github.com/docker/docker/api/types/mount" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/oci" "github.com/docker/docker/pkg/idtools" volumemounts "github.com/docker/docker/volume/mounts" diff --git a/daemon/create_windows.go b/daemon/create_windows.go index 1508ce76b3..1f5c059f93 100644 --- a/daemon/create_windows.go +++ b/daemon/create_windows.go @@ -5,7 +5,7 @@ import ( "fmt" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" volumemounts "github.com/docker/docker/volume/mounts" volumeopts "github.com/docker/docker/volume/service/opts" ) diff --git a/daemon/daemon.go b/daemon/daemon.go index d9628bc36c..2566073387 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -39,9 +39,9 @@ import ( "github.com/docker/docker/api/types/swarm" volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/builder" - "github.com/docker/docker/container" executorpkg "github.com/docker/docker/daemon/cluster/executor" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" ctrd "github.com/docker/docker/daemon/containerd" "github.com/docker/docker/daemon/events" _ "github.com/docker/docker/daemon/graphdriver/register" // register graph drivers diff --git a/daemon/daemon_test.go b/daemon/daemon_test.go index 5cc3d0ab9e..b5ce47d5dc 100644 --- a/daemon/daemon_test.go +++ b/daemon/daemon_test.go @@ -9,7 +9,7 @@ import ( cerrdefs "github.com/containerd/errdefs" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/libnetwork" "github.com/docker/docker/pkg/idtools" volumesservice "github.com/docker/docker/volume/service" diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index 5a61ebb4b5..2acb06f5c2 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -26,8 +26,8 @@ import ( "github.com/docker/docker/api/types/blkiodev" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/initlayer" "github.com/docker/docker/errdefs" "github.com/docker/docker/internal/nlwrap" diff --git a/daemon/daemon_unix_test.go b/daemon/daemon_unix_test.go index 432b2087f3..ecaa22a290 100644 --- a/daemon/daemon_unix_test.go +++ b/daemon/daemon_unix_test.go @@ -10,8 +10,8 @@ import ( "github.com/docker/docker/api/types/blkiodev" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/pkg/sysinfo" "github.com/opencontainers/selinux/go-selinux" "golang.org/x/sys/unix" diff --git a/daemon/daemon_windows.go b/daemon/daemon_windows.go index cb1ab5b475..7bf678a7b0 100644 --- a/daemon/daemon_windows.go +++ b/daemon/daemon_windows.go @@ -14,8 +14,8 @@ import ( "github.com/containerd/log" containertypes "github.com/docker/docker/api/types/container" networktypes "github.com/docker/docker/api/types/network" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/network" "github.com/docker/docker/libcontainerd/local" "github.com/docker/docker/libcontainerd/remote" diff --git a/daemon/delete.go b/daemon/delete.go index 0b4b2f31fd..d045fe41c6 100644 --- a/daemon/delete.go +++ b/daemon/delete.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types/backend" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" "github.com/docker/docker/internal/containerfs" diff --git a/daemon/delete_test.go b/daemon/delete_test.go index 0fc9776bd4..42adff2511 100644 --- a/daemon/delete_test.go +++ b/daemon/delete_test.go @@ -9,7 +9,7 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/docker/docker/api/types/backend" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) diff --git a/daemon/events.go b/daemon/events.go index 4567b7a6da..15d67af124 100644 --- a/daemon/events.go +++ b/daemon/events.go @@ -9,7 +9,7 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" daemonevents "github.com/docker/docker/daemon/events" "github.com/docker/docker/libnetwork" gogotypes "github.com/gogo/protobuf/types" diff --git a/daemon/events_test.go b/daemon/events_test.go index c5d0705494..f79ae246dc 100644 --- a/daemon/events_test.go +++ b/daemon/events_test.go @@ -6,7 +6,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" eventtypes "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/events" ) diff --git a/daemon/exec.go b/daemon/exec.go index 31bc8d01d4..ecc52fdf73 100644 --- a/daemon/exec.go +++ b/daemon/exec.go @@ -14,7 +14,7 @@ import ( "github.com/docker/docker/api/types/backend" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/internal/stream" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/pools" diff --git a/daemon/exec_linux.go b/daemon/exec_linux.go index 46c12cd9ee..46adbaafcc 100644 --- a/daemon/exec_linux.go +++ b/daemon/exec_linux.go @@ -6,8 +6,8 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/pkg/apparmor" coci "github.com/containerd/containerd/v2/pkg/oci" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/oci/caps" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/exec_linux_test.go b/daemon/exec_linux_test.go index c21754aaa2..1f4e26faa7 100644 --- a/daemon/exec_linux_test.go +++ b/daemon/exec_linux_test.go @@ -8,7 +8,7 @@ import ( "github.com/containerd/containerd/v2/pkg/apparmor" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/opencontainers/runtime-spec/specs-go" "gotest.tools/v3/assert" ) diff --git a/daemon/exec_windows.go b/daemon/exec_windows.go index f3a7c95bf9..a52217b062 100644 --- a/daemon/exec_windows.go +++ b/daemon/exec_windows.go @@ -3,8 +3,8 @@ package daemon import ( "context" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/export.go b/daemon/export.go index 257a5a281f..1d3a5cd7b8 100644 --- a/daemon/export.go +++ b/daemon/export.go @@ -8,7 +8,7 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/moby/go-archive" "github.com/moby/go-archive/chrootarchive" diff --git a/daemon/health.go b/daemon/health.go index e3d583b22a..e578280f72 100644 --- a/daemon/health.go +++ b/daemon/health.go @@ -12,7 +12,7 @@ import ( "github.com/docker/docker/api/types/backend" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/internal/metrics" ) diff --git a/daemon/health_test.go b/daemon/health_test.go index d3ff019f19..dd4fdd26a7 100644 --- a/daemon/health_test.go +++ b/daemon/health_test.go @@ -6,7 +6,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" eventtypes "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/events" ) diff --git a/daemon/image_service.go b/daemon/image_service.go index f4d572b6b0..d27fa98185 100644 --- a/daemon/image_service.go +++ b/daemon/image_service.go @@ -11,7 +11,7 @@ import ( imagetype "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/registry" "github.com/docker/docker/builder" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/images" "github.com/docker/docker/image" "github.com/docker/docker/layer" diff --git a/daemon/images/image_changes.go b/daemon/images/image_changes.go index 2b4e9dc88c..29361da733 100644 --- a/daemon/images/image_changes.go +++ b/daemon/images/image_changes.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/layer" "github.com/moby/go-archive" ) diff --git a/daemon/images/image_delete.go b/daemon/images/image_delete.go index 759bdc2498..188e7a373f 100644 --- a/daemon/images/image_delete.go +++ b/daemon/images/image_delete.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/events" imagetypes "github.com/docker/docker/api/types/image" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" "github.com/docker/docker/image" diff --git a/daemon/images/image_list.go b/daemon/images/image_list.go index 364923fab5..64f163582c 100644 --- a/daemon/images/image_list.go +++ b/daemon/images/image_list.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/api/types/backend" imagetypes "github.com/docker/docker/api/types/image" timetypes "github.com/docker/docker/api/types/time" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/image" "github.com/docker/docker/layer" ) diff --git a/daemon/images/image_unix.go b/daemon/images/image_unix.go index 76a04f8dcd..7699c2f2bb 100644 --- a/daemon/images/image_unix.go +++ b/daemon/images/image_unix.go @@ -6,7 +6,7 @@ import ( "context" "github.com/containerd/log" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/image" ) diff --git a/daemon/images/image_windows.go b/daemon/images/image_windows.go index 343ce429b0..39effe8cbc 100644 --- a/daemon/images/image_windows.go +++ b/daemon/images/image_windows.go @@ -3,7 +3,7 @@ package images import ( "context" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/image" "github.com/docker/docker/layer" "github.com/pkg/errors" diff --git a/daemon/images/service.go b/daemon/images/service.go index fb936fc35d..f63a8a5007 100644 --- a/daemon/images/service.go +++ b/daemon/images/service.go @@ -8,7 +8,7 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/leases" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" daemonevents "github.com/docker/docker/daemon/events" "github.com/docker/docker/distribution" "github.com/docker/docker/distribution/metadata" diff --git a/daemon/inspect.go b/daemon/inspect.go index 0554577a07..3fcbeeb5a5 100644 --- a/daemon/inspect.go +++ b/daemon/inspect.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types/backend" containertypes "github.com/docker/docker/api/types/container" networktypes "github.com/docker/docker/api/types/network" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/network" "github.com/docker/docker/errdefs" "github.com/docker/go-connections/nat" diff --git a/daemon/inspect_linux.go b/daemon/inspect_linux.go index e405f02480..512f169a45 100644 --- a/daemon/inspect_linux.go +++ b/daemon/inspect_linux.go @@ -3,7 +3,7 @@ package daemon import ( "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/container" - containerpkg "github.com/docker/docker/container" + containerpkg "github.com/docker/docker/daemon/container" ) // This sets platform-specific fields diff --git a/daemon/inspect_test.go b/daemon/inspect_test.go index 6cdaf5eb93..1a09971596 100644 --- a/daemon/inspect_test.go +++ b/daemon/inspect_test.go @@ -4,7 +4,7 @@ import ( "testing" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) diff --git a/daemon/inspect_windows.go b/daemon/inspect_windows.go index c2b71341b0..2881934e47 100644 --- a/daemon/inspect_windows.go +++ b/daemon/inspect_windows.go @@ -3,7 +3,7 @@ package daemon import ( "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/container" - containerpkg "github.com/docker/docker/container" + containerpkg "github.com/docker/docker/daemon/container" ) // This sets platform-specific fields diff --git a/daemon/kill.go b/daemon/kill.go index 01163b80b7..e07c6d71c2 100644 --- a/daemon/kill.go +++ b/daemon/kill.go @@ -12,7 +12,7 @@ import ( "github.com/containerd/log" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" - containerpkg "github.com/docker/docker/container" + containerpkg "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/moby/sys/signal" "github.com/pkg/errors" diff --git a/daemon/links.go b/daemon/links.go index 219a502766..55783ce654 100644 --- a/daemon/links.go +++ b/daemon/links.go @@ -3,7 +3,7 @@ package daemon import ( "sync" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" ) // linkIndex stores link relationships between containers, including their specified alias diff --git a/daemon/list.go b/daemon/list.go index e2a9c43cdd..338e767b5e 100644 --- a/daemon/list.go +++ b/daemon/list.go @@ -14,7 +14,7 @@ import ( "github.com/docker/docker/api/types/backend" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/docker/docker/image" "github.com/docker/go-connections/nat" diff --git a/daemon/list_test.go b/daemon/list_test.go index cdf035ee31..6ef0451ad0 100644 --- a/daemon/list_test.go +++ b/daemon/list_test.go @@ -10,7 +10,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/image" "github.com/google/uuid" "github.com/opencontainers/go-digest" diff --git a/daemon/list_unix.go b/daemon/list_unix.go index 04eb1104e7..b071fe78b3 100644 --- a/daemon/list_unix.go +++ b/daemon/list_unix.go @@ -2,7 +2,7 @@ package daemon -import "github.com/docker/docker/container" +import "github.com/docker/docker/daemon/container" // excludeByIsolation is a platform specific helper function to support PS // filtering by Isolation. This is a Windows-only concept, so is a no-op on Unix. diff --git a/daemon/list_windows.go b/daemon/list_windows.go index d4147979be..97d01bc29f 100644 --- a/daemon/list_windows.go +++ b/daemon/list_windows.go @@ -3,7 +3,7 @@ package daemon import ( "strings" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" ) // excludeByIsolation is a platform specific helper function to support PS diff --git a/daemon/logs.go b/daemon/logs.go index 9aa85ad437..c0a74d2af9 100644 --- a/daemon/logs.go +++ b/daemon/logs.go @@ -10,8 +10,8 @@ import ( "github.com/docker/docker/api/types/backend" containertypes "github.com/docker/docker/api/types/container" timetypes "github.com/docker/docker/api/types/time" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/logger" logcache "github.com/docker/docker/daemon/logger/loggerutils/cache" "github.com/docker/docker/errdefs" diff --git a/daemon/migration.go b/daemon/migration.go index cadc4c9631..2e2326ccf6 100644 --- a/daemon/migration.go +++ b/daemon/migration.go @@ -8,7 +8,7 @@ import ( "github.com/containerd/log" "github.com/containerd/platforms" "github.com/docker/docker/api/types/backend" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/image" "github.com/docker/docker/internal/multierror" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/daemon/migration_test.go b/daemon/migration_test.go index 295ade9995..a60aea8908 100644 --- a/daemon/migration_test.go +++ b/daemon/migration_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/containerd/platforms" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/image" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "gotest.tools/v3/assert" diff --git a/daemon/monitor.go b/daemon/monitor.go index 81d6b79f3e..24ee82709d 100644 --- a/daemon/monitor.go +++ b/daemon/monitor.go @@ -10,8 +10,8 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/internal/metrics" libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/restartmanager" diff --git a/daemon/mounts.go b/daemon/mounts.go index d647bd3853..815161e30b 100644 --- a/daemon/mounts.go +++ b/daemon/mounts.go @@ -7,7 +7,7 @@ import ( "github.com/containerd/log" mounttypes "github.com/docker/docker/api/types/mount" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" volumesservice "github.com/docker/docker/volume/service" ) diff --git a/daemon/names.go b/daemon/names.go index 8c76ee40e4..c47c607ee0 100644 --- a/daemon/names.go +++ b/daemon/names.go @@ -6,7 +6,7 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/names" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/namesgenerator" diff --git a/daemon/network.go b/daemon/network.go index 556e887035..8d3242245f 100644 --- a/daemon/network.go +++ b/daemon/network.go @@ -16,9 +16,9 @@ import ( "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/filters" networktypes "github.com/docker/docker/api/types/network" - "github.com/docker/docker/container" clustertypes "github.com/docker/docker/daemon/cluster/provider" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/network" "github.com/docker/docker/errdefs" "github.com/docker/docker/internal/otelutil" diff --git a/daemon/oci_linux.go b/daemon/oci_linux.go index 6a584f9e73..aa984492e1 100644 --- a/daemon/oci_linux.go +++ b/daemon/oci_linux.go @@ -14,8 +14,8 @@ import ( coci "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/log" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" dconfig "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/docker/docker/internal/rootless/mountopts" "github.com/docker/docker/internal/rootless/specconv" diff --git a/daemon/oci_linux_test.go b/daemon/oci_linux_test.go index 049397cca5..cdbe57dc24 100644 --- a/daemon/oci_linux_test.go +++ b/daemon/oci_linux_test.go @@ -7,8 +7,8 @@ import ( "testing" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/network" "github.com/docker/docker/libnetwork" nwconfig "github.com/docker/docker/libnetwork/config" diff --git a/daemon/oci_opts.go b/daemon/oci_opts.go index 43c208bca3..bb08620db4 100644 --- a/daemon/oci_opts.go +++ b/daemon/oci_opts.go @@ -5,7 +5,7 @@ import ( "github.com/containerd/containerd/v2/core/containers" coci "github.com/containerd/containerd/v2/pkg/oci" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/oci_utils.go b/daemon/oci_utils.go index 2fd63a253d..c9cf731282 100644 --- a/daemon/oci_utils.go +++ b/daemon/oci_utils.go @@ -1,7 +1,7 @@ package daemon import ( - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/oci_windows.go b/daemon/oci_windows.go index 6c77d778b6..afd1c73431 100644 --- a/daemon/oci_windows.go +++ b/daemon/oci_windows.go @@ -14,8 +14,8 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/backend" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/docker/docker/image" "github.com/docker/docker/oci" diff --git a/daemon/oci_windows_test.go b/daemon/oci_windows_test.go index 0f676056d0..8007c50606 100644 --- a/daemon/oci_windows_test.go +++ b/daemon/oci_windows_test.go @@ -11,7 +11,7 @@ import ( "gotest.tools/v3/fs" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" swarmagent "github.com/moby/swarmkit/v2/agent" swarmapi "github.com/moby/swarmkit/v2/api" "github.com/opencontainers/runtime-spec/specs-go" diff --git a/daemon/pause.go b/daemon/pause.go index b1aa3a27bb..82dcedc3cb 100644 --- a/daemon/pause.go +++ b/daemon/pause.go @@ -6,7 +6,7 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" ) // ContainerPause pauses a container diff --git a/daemon/rename.go b/daemon/rename.go index 9b6931b5c8..7d632c6612 100644 --- a/daemon/rename.go +++ b/daemon/rename.go @@ -7,7 +7,7 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/network" "github.com/docker/docker/errdefs" "github.com/docker/docker/libnetwork" diff --git a/daemon/resize_test.go b/daemon/resize_test.go index c916e706a2..5855c7b4e6 100644 --- a/daemon/resize_test.go +++ b/daemon/resize_test.go @@ -6,7 +6,7 @@ import ( "context" "testing" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/libcontainerd/types" "gotest.tools/v3/assert" ) diff --git a/daemon/restart.go b/daemon/restart.go index a27fc1e625..98672b853a 100644 --- a/daemon/restart.go +++ b/daemon/restart.go @@ -6,7 +6,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" ) // ContainerRestart stops and starts a container. It attempts to diff --git a/daemon/seccomp_linux.go b/daemon/seccomp_linux.go index f35e259e22..74b6e4ab9d 100644 --- a/daemon/seccomp_linux.go +++ b/daemon/seccomp_linux.go @@ -7,8 +7,8 @@ import ( "github.com/containerd/containerd/v2/core/containers" coci "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/log" - "github.com/docker/docker/container" dconfig "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/profiles/seccomp" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/seccomp_linux_test.go b/daemon/seccomp_linux_test.go index 4b28e07201..5ab66d1b29 100644 --- a/daemon/seccomp_linux_test.go +++ b/daemon/seccomp_linux_test.go @@ -5,8 +5,8 @@ import ( coci "github.com/containerd/containerd/v2/pkg/oci" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" dconfig "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/oci" "github.com/docker/docker/pkg/sysinfo" "github.com/docker/docker/profiles/seccomp" diff --git a/daemon/seccomp_unsupported.go b/daemon/seccomp_unsupported.go index 2cae1d197c..70ff4453b6 100644 --- a/daemon/seccomp_unsupported.go +++ b/daemon/seccomp_unsupported.go @@ -7,7 +7,7 @@ import ( "github.com/containerd/containerd/v2/core/containers" coci "github.com/containerd/containerd/v2/pkg/oci" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" ) const supportsSeccomp = false diff --git a/daemon/start.go b/daemon/start.go index 28096bcaad..321e99a66a 100644 --- a/daemon/start.go +++ b/daemon/start.go @@ -9,7 +9,7 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/backend" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" mobyc8dstore "github.com/docker/docker/daemon/containerd" "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" diff --git a/daemon/start_linux.go b/daemon/start_linux.go index 7c31ab7c2e..8b24bcf87c 100644 --- a/daemon/start_linux.go +++ b/daemon/start_linux.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/oci" diff --git a/daemon/start_notlinux.go b/daemon/start_notlinux.go index 9d1b525f21..8b8135ab50 100644 --- a/daemon/start_notlinux.go +++ b/daemon/start_notlinux.go @@ -5,8 +5,8 @@ package daemon import ( "context" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/libcontainerd/types" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/start_unix.go b/daemon/start_unix.go index 0badf07f3a..df19555884 100644 --- a/daemon/start_unix.go +++ b/daemon/start_unix.go @@ -5,7 +5,7 @@ package daemon import ( "context" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" ) // getLibcontainerdCreateOptions callers must hold a lock on the container diff --git a/daemon/start_windows.go b/daemon/start_windows.go index 81f5c1b844..b8893d22ac 100644 --- a/daemon/start_windows.go +++ b/daemon/start_windows.go @@ -2,8 +2,8 @@ package daemon import ( "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options" - "github.com/docker/docker/container" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/pkg/system" ) diff --git a/daemon/stats.go b/daemon/stats.go index 4113f33392..3946d440a2 100644 --- a/daemon/stats.go +++ b/daemon/stats.go @@ -10,7 +10,7 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/backend" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" ) diff --git a/daemon/stats/collector.go b/daemon/stats/collector.go index f0c23ac093..5ab582406c 100644 --- a/daemon/stats/collector.go +++ b/daemon/stats/collector.go @@ -5,7 +5,7 @@ import ( "time" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/moby/pubsub" ) diff --git a/daemon/stats_unix.go b/daemon/stats_unix.go index 790cf9118b..36732b46bf 100644 --- a/daemon/stats_unix.go +++ b/daemon/stats_unix.go @@ -14,7 +14,7 @@ import ( statsV1 "github.com/containerd/cgroups/v3/cgroup1/stats" statsV2 "github.com/containerd/cgroups/v3/cgroup2/stats" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/pkg/errors" ) diff --git a/daemon/stats_windows.go b/daemon/stats_windows.go index cf7725f1b4..e2666e4f42 100644 --- a/daemon/stats_windows.go +++ b/daemon/stats_windows.go @@ -5,7 +5,7 @@ import ( cerrdefs "github.com/containerd/errdefs" containertypes "github.com/docker/docker/api/types/container" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/internal/platform" ) diff --git a/daemon/stop.go b/daemon/stop.go index 05680d8982..56177acb73 100644 --- a/daemon/stop.go +++ b/daemon/stop.go @@ -7,7 +7,7 @@ import ( "github.com/containerd/log" containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/moby/sys/signal" "github.com/pkg/errors" diff --git a/daemon/unpause.go b/daemon/unpause.go index 6aca609740..ee0aa2b7f0 100644 --- a/daemon/unpause.go +++ b/daemon/unpause.go @@ -6,7 +6,7 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/events" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" ) // ContainerUnpause unpauses a container diff --git a/daemon/volumes.go b/daemon/volumes.go index 85e46626dd..b36b593b39 100644 --- a/daemon/volumes.go +++ b/daemon/volumes.go @@ -14,7 +14,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" mounttypes "github.com/docker/docker/api/types/mount" volumetypes "github.com/docker/docker/api/types/volume" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/errdefs" "github.com/docker/docker/layer" "github.com/docker/docker/volume" diff --git a/daemon/volumes_unix.go b/daemon/volumes_unix.go index 3c2fe13d76..17bac49a72 100644 --- a/daemon/volumes_unix.go +++ b/daemon/volumes_unix.go @@ -12,7 +12,7 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/events" mounttypes "github.com/docker/docker/api/types/mount" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/internal/cleanups" "github.com/docker/docker/pkg/idtools" volumemounts "github.com/docker/docker/volume/mounts" diff --git a/daemon/volumes_windows.go b/daemon/volumes_windows.go index 72695c8212..9eef9b4612 100644 --- a/daemon/volumes_windows.go +++ b/daemon/volumes_windows.go @@ -5,7 +5,7 @@ import ( "github.com/containerd/log" "github.com/docker/docker/api/types/mount" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/internal/cleanups" "github.com/docker/docker/pkg/idtools" volumemounts "github.com/docker/docker/volume/mounts" diff --git a/integration/container/daemon_linux_test.go b/integration/container/daemon_linux_test.go index 404bfa43fd..9a0a54de0c 100644 --- a/integration/container/daemon_linux_test.go +++ b/integration/container/daemon_linux_test.go @@ -11,7 +11,7 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" - realcontainer "github.com/docker/docker/container" + realcontainer "github.com/docker/docker/daemon/container" "github.com/docker/docker/integration/internal/container" "github.com/docker/docker/testutil" "github.com/docker/docker/testutil/daemon" diff --git a/testutil/daemon/daemon.go b/testutil/daemon/daemon.go index 97158f9685..c693323c36 100644 --- a/testutil/daemon/daemon.go +++ b/testutil/daemon/daemon.go @@ -24,7 +24,7 @@ import ( "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/system" "github.com/docker/docker/client" - "github.com/docker/docker/container" + "github.com/docker/docker/daemon/container" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/pkg/tailfile" From 6835f367e5c2bb67dc6d188c8f4440695288a817 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:27:36 -0700 Subject: [PATCH 08/14] Move libcontainerd/local to daemon/internal/libcontainerd/local Signed-off-by: Derek McGowan --- daemon/daemon_windows.go | 2 +- .../internal/libcontainerd}/local/local_windows.go | 0 .../internal/libcontainerd}/local/process_windows.go | 0 .../internal/libcontainerd}/local/utils_windows.go | 0 .../internal/libcontainerd}/local/utils_windows_test.go | 0 libcontainerd/libcontainerd_windows.go | 2 +- 6 files changed, 2 insertions(+), 2 deletions(-) rename {libcontainerd => daemon/internal/libcontainerd}/local/local_windows.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/local/process_windows.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/local/utils_windows.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/local/utils_windows_test.go (100%) diff --git a/daemon/daemon_windows.go b/daemon/daemon_windows.go index 7bf678a7b0..c8222a6ee2 100644 --- a/daemon/daemon_windows.go +++ b/daemon/daemon_windows.go @@ -16,8 +16,8 @@ import ( networktypes "github.com/docker/docker/api/types/network" "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/container" + "github.com/docker/docker/daemon/internal/libcontainerd/local" "github.com/docker/docker/daemon/network" - "github.com/docker/docker/libcontainerd/local" "github.com/docker/docker/libcontainerd/remote" "github.com/docker/docker/libnetwork" nwconfig "github.com/docker/docker/libnetwork/config" diff --git a/libcontainerd/local/local_windows.go b/daemon/internal/libcontainerd/local/local_windows.go similarity index 100% rename from libcontainerd/local/local_windows.go rename to daemon/internal/libcontainerd/local/local_windows.go diff --git a/libcontainerd/local/process_windows.go b/daemon/internal/libcontainerd/local/process_windows.go similarity index 100% rename from libcontainerd/local/process_windows.go rename to daemon/internal/libcontainerd/local/process_windows.go diff --git a/libcontainerd/local/utils_windows.go b/daemon/internal/libcontainerd/local/utils_windows.go similarity index 100% rename from libcontainerd/local/utils_windows.go rename to daemon/internal/libcontainerd/local/utils_windows.go diff --git a/libcontainerd/local/utils_windows_test.go b/daemon/internal/libcontainerd/local/utils_windows_test.go similarity index 100% rename from libcontainerd/local/utils_windows_test.go rename to daemon/internal/libcontainerd/local/utils_windows_test.go diff --git a/libcontainerd/libcontainerd_windows.go b/libcontainerd/libcontainerd_windows.go index ddb0cfa5f5..0f063355fe 100644 --- a/libcontainerd/libcontainerd_windows.go +++ b/libcontainerd/libcontainerd_windows.go @@ -4,7 +4,7 @@ import ( "context" containerd "github.com/containerd/containerd/v2/client" - "github.com/docker/docker/libcontainerd/local" + "github.com/docker/docker/daemon/internal/libcontainerd/local" "github.com/docker/docker/libcontainerd/remote" libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/pkg/system" From dd1656e6bceb1d11bdc87483439c46acd3f04737 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:27:52 -0700 Subject: [PATCH 09/14] Move libcontainerd/queue to daemon/internal/libcontainerd/queue Signed-off-by: Derek McGowan --- daemon/internal/libcontainerd/local/local_windows.go | 2 +- {libcontainerd => daemon/internal/libcontainerd}/queue/queue.go | 0 .../internal/libcontainerd}/queue/queue_test.go | 0 libcontainerd/remote/client.go | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename {libcontainerd => daemon/internal/libcontainerd}/queue/queue.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/queue/queue_test.go (100%) diff --git a/daemon/internal/libcontainerd/local/local_windows.go b/daemon/internal/libcontainerd/local/local_windows.go index 80bf2cd39e..bd5f1eb163 100644 --- a/daemon/internal/libcontainerd/local/local_windows.go +++ b/daemon/internal/libcontainerd/local/local_windows.go @@ -21,8 +21,8 @@ import ( "github.com/containerd/containerd/v2/pkg/cio" cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" + "github.com/docker/docker/daemon/internal/libcontainerd/queue" "github.com/docker/docker/errdefs" - "github.com/docker/docker/libcontainerd/queue" libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/pkg/system" "github.com/opencontainers/runtime-spec/specs-go" diff --git a/libcontainerd/queue/queue.go b/daemon/internal/libcontainerd/queue/queue.go similarity index 100% rename from libcontainerd/queue/queue.go rename to daemon/internal/libcontainerd/queue/queue.go diff --git a/libcontainerd/queue/queue_test.go b/daemon/internal/libcontainerd/queue/queue_test.go similarity index 100% rename from libcontainerd/queue/queue_test.go rename to daemon/internal/libcontainerd/queue/queue_test.go diff --git a/libcontainerd/remote/client.go b/libcontainerd/remote/client.go index 3d3ec6317b..ac193ca0e6 100644 --- a/libcontainerd/remote/client.go +++ b/libcontainerd/remote/client.go @@ -25,8 +25,8 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/typeurl/v2" + "github.com/docker/docker/daemon/internal/libcontainerd/queue" "github.com/docker/docker/errdefs" - "github.com/docker/docker/libcontainerd/queue" libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/pkg/ioutils" "github.com/hashicorp/go-multierror" From 4e8bd050bf5d7f50808ca648d6dc8b7e19c1879d Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:28:08 -0700 Subject: [PATCH 10/14] Move libcontainerd/remote to daemon/internal/libcontainerd/remote Signed-off-by: Derek McGowan --- daemon/daemon_unix.go | 2 +- daemon/daemon_windows.go | 2 +- .../internal/libcontainerd}/remote/client.go | 0 .../internal/libcontainerd}/remote/client_io_windows.go | 0 .../internal/libcontainerd}/remote/client_linux.go | 0 .../internal/libcontainerd}/remote/client_windows.go | 0 libcontainerd/libcontainerd_linux.go | 2 +- libcontainerd/libcontainerd_windows.go | 2 +- 8 files changed, 4 insertions(+), 4 deletions(-) rename {libcontainerd => daemon/internal/libcontainerd}/remote/client.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/remote/client_io_windows.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/remote/client_linux.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/remote/client_windows.go (100%) diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index 2acb06f5c2..9c38f9cc7a 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -29,11 +29,11 @@ import ( "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/initlayer" + "github.com/docker/docker/daemon/internal/libcontainerd/remote" "github.com/docker/docker/errdefs" "github.com/docker/docker/internal/nlwrap" "github.com/docker/docker/internal/otelutil" "github.com/docker/docker/internal/usergroup" - "github.com/docker/docker/libcontainerd/remote" "github.com/docker/docker/libnetwork" nwconfig "github.com/docker/docker/libnetwork/config" "github.com/docker/docker/libnetwork/drivers/bridge" diff --git a/daemon/daemon_windows.go b/daemon/daemon_windows.go index c8222a6ee2..3d321d2036 100644 --- a/daemon/daemon_windows.go +++ b/daemon/daemon_windows.go @@ -17,8 +17,8 @@ import ( "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/internal/libcontainerd/local" + "github.com/docker/docker/daemon/internal/libcontainerd/remote" "github.com/docker/docker/daemon/network" - "github.com/docker/docker/libcontainerd/remote" "github.com/docker/docker/libnetwork" nwconfig "github.com/docker/docker/libnetwork/config" winlibnetwork "github.com/docker/docker/libnetwork/drivers/windows" diff --git a/libcontainerd/remote/client.go b/daemon/internal/libcontainerd/remote/client.go similarity index 100% rename from libcontainerd/remote/client.go rename to daemon/internal/libcontainerd/remote/client.go diff --git a/libcontainerd/remote/client_io_windows.go b/daemon/internal/libcontainerd/remote/client_io_windows.go similarity index 100% rename from libcontainerd/remote/client_io_windows.go rename to daemon/internal/libcontainerd/remote/client_io_windows.go diff --git a/libcontainerd/remote/client_linux.go b/daemon/internal/libcontainerd/remote/client_linux.go similarity index 100% rename from libcontainerd/remote/client_linux.go rename to daemon/internal/libcontainerd/remote/client_linux.go diff --git a/libcontainerd/remote/client_windows.go b/daemon/internal/libcontainerd/remote/client_windows.go similarity index 100% rename from libcontainerd/remote/client_windows.go rename to daemon/internal/libcontainerd/remote/client_windows.go diff --git a/libcontainerd/libcontainerd_linux.go b/libcontainerd/libcontainerd_linux.go index 6279caf9f0..671d7576ef 100644 --- a/libcontainerd/libcontainerd_linux.go +++ b/libcontainerd/libcontainerd_linux.go @@ -4,7 +4,7 @@ import ( "context" containerd "github.com/containerd/containerd/v2/client" - "github.com/docker/docker/libcontainerd/remote" + "github.com/docker/docker/daemon/internal/libcontainerd/remote" libcontainerdtypes "github.com/docker/docker/libcontainerd/types" ) diff --git a/libcontainerd/libcontainerd_windows.go b/libcontainerd/libcontainerd_windows.go index 0f063355fe..49187069b6 100644 --- a/libcontainerd/libcontainerd_windows.go +++ b/libcontainerd/libcontainerd_windows.go @@ -5,7 +5,7 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/docker/docker/daemon/internal/libcontainerd/local" - "github.com/docker/docker/libcontainerd/remote" + "github.com/docker/docker/daemon/internal/libcontainerd/remote" libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/pkg/system" ) From fe959261d3a291441598560e6a7cfe6abae3b443 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:28:24 -0700 Subject: [PATCH 11/14] Move libcontainerd/shimopts to daemon/internal/libcontainerd/shimopts Signed-off-by: Derek McGowan --- .../internal/libcontainerd}/shimopts/convert.go | 0 daemon/runtime_unix.go | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename {libcontainerd => daemon/internal/libcontainerd}/shimopts/convert.go (100%) diff --git a/libcontainerd/shimopts/convert.go b/daemon/internal/libcontainerd/shimopts/convert.go similarity index 100% rename from libcontainerd/shimopts/convert.go rename to daemon/internal/libcontainerd/shimopts/convert.go diff --git a/daemon/runtime_unix.go b/daemon/runtime_unix.go index a7b15e48ad..b00250237f 100644 --- a/daemon/runtime_unix.go +++ b/daemon/runtime_unix.go @@ -19,8 +19,8 @@ import ( "github.com/containerd/containerd/v2/plugins" "github.com/containerd/log" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/internal/libcontainerd/shimopts" "github.com/docker/docker/errdefs" - "github.com/docker/docker/libcontainerd/shimopts" "github.com/moby/sys/atomicwriter" "github.com/opencontainers/runtime-spec/specs-go/features" "github.com/pkg/errors" From 841a369b8f91e72c7f9ea1fd757161c58c460971 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:28:40 -0700 Subject: [PATCH 12/14] Move libcontainerd/supervisor to daemon/internal/libcontainerd/supervisor Signed-off-by: Derek McGowan --- daemon/command/daemon.go | 2 +- .../internal/libcontainerd}/supervisor/remote_daemon.go | 0 .../internal/libcontainerd}/supervisor/remote_daemon_linux.go | 0 .../internal/libcontainerd}/supervisor/remote_daemon_options.go | 0 .../internal/libcontainerd}/supervisor/remote_daemon_windows.go | 0 .../internal/libcontainerd}/supervisor/utils_linux.go | 0 .../internal/libcontainerd}/supervisor/utils_windows.go | 0 7 files changed, 1 insertion(+), 1 deletion(-) rename {libcontainerd => daemon/internal/libcontainerd}/supervisor/remote_daemon.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/supervisor/remote_daemon_linux.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/supervisor/remote_daemon_options.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/supervisor/remote_daemon_windows.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/supervisor/utils_linux.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/supervisor/utils_windows.go (100%) diff --git a/daemon/command/daemon.go b/daemon/command/daemon.go index e88d632550..7ce2b84066 100644 --- a/daemon/command/daemon.go +++ b/daemon/command/daemon.go @@ -28,6 +28,7 @@ import ( "github.com/docker/docker/daemon/command/debug" "github.com/docker/docker/daemon/command/trap" "github.com/docker/docker/daemon/config" + "github.com/docker/docker/daemon/internal/libcontainerd/supervisor" "github.com/docker/docker/daemon/listeners" "github.com/docker/docker/daemon/pkg/plugin" apiserver "github.com/docker/docker/daemon/server" @@ -48,7 +49,6 @@ import ( "github.com/docker/docker/daemon/server/router/volume" "github.com/docker/docker/dockerversion" "github.com/docker/docker/internal/otelutil" - "github.com/docker/docker/libcontainerd/supervisor" dopts "github.com/docker/docker/opts" "github.com/docker/docker/pkg/authorization" "github.com/docker/docker/pkg/homedir" diff --git a/libcontainerd/supervisor/remote_daemon.go b/daemon/internal/libcontainerd/supervisor/remote_daemon.go similarity index 100% rename from libcontainerd/supervisor/remote_daemon.go rename to daemon/internal/libcontainerd/supervisor/remote_daemon.go diff --git a/libcontainerd/supervisor/remote_daemon_linux.go b/daemon/internal/libcontainerd/supervisor/remote_daemon_linux.go similarity index 100% rename from libcontainerd/supervisor/remote_daemon_linux.go rename to daemon/internal/libcontainerd/supervisor/remote_daemon_linux.go diff --git a/libcontainerd/supervisor/remote_daemon_options.go b/daemon/internal/libcontainerd/supervisor/remote_daemon_options.go similarity index 100% rename from libcontainerd/supervisor/remote_daemon_options.go rename to daemon/internal/libcontainerd/supervisor/remote_daemon_options.go diff --git a/libcontainerd/supervisor/remote_daemon_windows.go b/daemon/internal/libcontainerd/supervisor/remote_daemon_windows.go similarity index 100% rename from libcontainerd/supervisor/remote_daemon_windows.go rename to daemon/internal/libcontainerd/supervisor/remote_daemon_windows.go diff --git a/libcontainerd/supervisor/utils_linux.go b/daemon/internal/libcontainerd/supervisor/utils_linux.go similarity index 100% rename from libcontainerd/supervisor/utils_linux.go rename to daemon/internal/libcontainerd/supervisor/utils_linux.go diff --git a/libcontainerd/supervisor/utils_windows.go b/daemon/internal/libcontainerd/supervisor/utils_windows.go similarity index 100% rename from libcontainerd/supervisor/utils_windows.go rename to daemon/internal/libcontainerd/supervisor/utils_windows.go From 3ee8c1e3a9d7f2b74e69471251f31221191a6aff Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:28:56 -0700 Subject: [PATCH 13/14] Move libcontainerd/types to daemon/internal/libcontainerd/types Signed-off-by: Derek McGowan --- daemon/container/container.go | 2 +- daemon/container/exec.go | 2 +- daemon/container/state.go | 2 +- daemon/container/state_test.go | 2 +- daemon/daemon.go | 2 +- daemon/internal/libcontainerd/local/local_windows.go | 2 +- daemon/internal/libcontainerd/remote/client.go | 2 +- daemon/internal/libcontainerd/remote/client_linux.go | 2 +- daemon/internal/libcontainerd/remote/client_windows.go | 2 +- {libcontainerd => daemon/internal/libcontainerd}/types/types.go | 0 .../internal/libcontainerd}/types/types_linux.go | 0 .../internal/libcontainerd}/types/types_windows.go | 0 daemon/internal/plugin/executor/containerd/containerd.go | 2 +- daemon/monitor.go | 2 +- daemon/resize_test.go | 2 +- daemon/start_linux.go | 2 +- daemon/start_notlinux.go | 2 +- daemon/top_unix.go | 2 +- daemon/top_windows.go | 2 +- daemon/update_linux.go | 2 +- daemon/update_windows.go | 2 +- libcontainerd/libcontainerd_linux.go | 2 +- libcontainerd/libcontainerd_windows.go | 2 +- libcontainerd/replace.go | 2 +- 24 files changed, 21 insertions(+), 21 deletions(-) rename {libcontainerd => daemon/internal/libcontainerd}/types/types.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/types/types_linux.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/types/types_windows.go (100%) diff --git a/daemon/container/container.go b/daemon/container/container.go index ee145d8986..13f6751da6 100644 --- a/daemon/container/container.go +++ b/daemon/container/container.go @@ -21,6 +21,7 @@ import ( "github.com/docker/docker/api/types/events" mounttypes "github.com/docker/docker/api/types/mount" swarmtypes "github.com/docker/docker/api/types/swarm" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/daemon/internal/stream" "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger/jsonfilelog" @@ -29,7 +30,6 @@ import ( "github.com/docker/docker/daemon/network" "github.com/docker/docker/errdefs" "github.com/docker/docker/image" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/oci" "github.com/docker/docker/restartmanager" "github.com/docker/docker/volume" diff --git a/daemon/container/exec.go b/daemon/container/exec.go index 5695493e96..9075b5504d 100644 --- a/daemon/container/exec.go +++ b/daemon/container/exec.go @@ -7,8 +7,8 @@ import ( "github.com/containerd/containerd/v2/pkg/cio" "github.com/containerd/log" + "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/daemon/internal/stream" - "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/pkg/stringid" ) diff --git a/daemon/container/state.go b/daemon/container/state.go index c3fe0110dd..f87d24a295 100644 --- a/daemon/container/state.go +++ b/daemon/container/state.go @@ -8,7 +8,7 @@ import ( "time" "github.com/docker/docker/api/types/container" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/go-units" ) diff --git a/daemon/container/state_test.go b/daemon/container/state_test.go index cf99f2d9ca..943aa2a9d7 100644 --- a/daemon/container/state_test.go +++ b/daemon/container/state_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/docker/docker/api/types/container" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" ) type mockTask struct { diff --git a/daemon/daemon.go b/daemon/daemon.go index 2566073387..675bdeed71 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -46,6 +46,7 @@ import ( "github.com/docker/docker/daemon/events" _ "github.com/docker/docker/daemon/graphdriver/register" // register graph drivers "github.com/docker/docker/daemon/images" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/daemon/internal/metrics" pluginexec "github.com/docker/docker/daemon/internal/plugin/executor/containerd" dlogger "github.com/docker/docker/daemon/logger" @@ -58,7 +59,6 @@ import ( "github.com/docker/docker/dockerversion" "github.com/docker/docker/image" "github.com/docker/docker/layer" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/libnetwork" "github.com/docker/docker/libnetwork/cluster" nwconfig "github.com/docker/docker/libnetwork/config" diff --git a/daemon/internal/libcontainerd/local/local_windows.go b/daemon/internal/libcontainerd/local/local_windows.go index bd5f1eb163..8bc967dce7 100644 --- a/daemon/internal/libcontainerd/local/local_windows.go +++ b/daemon/internal/libcontainerd/local/local_windows.go @@ -22,8 +22,8 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/docker/docker/daemon/internal/libcontainerd/queue" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/errdefs" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/pkg/system" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" diff --git a/daemon/internal/libcontainerd/remote/client.go b/daemon/internal/libcontainerd/remote/client.go index ac193ca0e6..792fbb1d5a 100644 --- a/daemon/internal/libcontainerd/remote/client.go +++ b/daemon/internal/libcontainerd/remote/client.go @@ -26,8 +26,8 @@ import ( "github.com/containerd/log" "github.com/containerd/typeurl/v2" "github.com/docker/docker/daemon/internal/libcontainerd/queue" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/errdefs" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/pkg/ioutils" "github.com/hashicorp/go-multierror" "github.com/opencontainers/go-digest" diff --git a/daemon/internal/libcontainerd/remote/client_linux.go b/daemon/internal/libcontainerd/remote/client_linux.go index 2d2bafd57e..03a6654757 100644 --- a/daemon/internal/libcontainerd/remote/client_linux.go +++ b/daemon/internal/libcontainerd/remote/client_linux.go @@ -11,7 +11,7 @@ import ( "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/pkg/cio" "github.com/containerd/log" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/moby/sys/user" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/internal/libcontainerd/remote/client_windows.go b/daemon/internal/libcontainerd/remote/client_windows.go index e1d930867d..d659e1cfd7 100644 --- a/daemon/internal/libcontainerd/remote/client_windows.go +++ b/daemon/internal/libcontainerd/remote/client_windows.go @@ -11,7 +11,7 @@ import ( "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/pkg/cio" "github.com/containerd/log" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) diff --git a/libcontainerd/types/types.go b/daemon/internal/libcontainerd/types/types.go similarity index 100% rename from libcontainerd/types/types.go rename to daemon/internal/libcontainerd/types/types.go diff --git a/libcontainerd/types/types_linux.go b/daemon/internal/libcontainerd/types/types_linux.go similarity index 100% rename from libcontainerd/types/types_linux.go rename to daemon/internal/libcontainerd/types/types_linux.go diff --git a/libcontainerd/types/types_windows.go b/daemon/internal/libcontainerd/types/types_windows.go similarity index 100% rename from libcontainerd/types/types_windows.go rename to daemon/internal/libcontainerd/types/types_windows.go diff --git a/daemon/internal/plugin/executor/containerd/containerd.go b/daemon/internal/plugin/executor/containerd/containerd.go index 5e3922b2d0..83a077ffd8 100644 --- a/daemon/internal/plugin/executor/containerd/containerd.go +++ b/daemon/internal/plugin/executor/containerd/containerd.go @@ -11,9 +11,9 @@ import ( "github.com/containerd/containerd/v2/pkg/cio" cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/errdefs" "github.com/docker/docker/libcontainerd" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) diff --git a/daemon/monitor.go b/daemon/monitor.go index 24ee82709d..248fc3229d 100644 --- a/daemon/monitor.go +++ b/daemon/monitor.go @@ -12,8 +12,8 @@ import ( "github.com/docker/docker/api/types/events" "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/container" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/daemon/internal/metrics" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/restartmanager" "github.com/pkg/errors" ) diff --git a/daemon/resize_test.go b/daemon/resize_test.go index 5855c7b4e6..fe40a54b18 100644 --- a/daemon/resize_test.go +++ b/daemon/resize_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/docker/docker/daemon/container" - "github.com/docker/docker/libcontainerd/types" + "github.com/docker/docker/daemon/internal/libcontainerd/types" "gotest.tools/v3/assert" ) diff --git a/daemon/start_linux.go b/daemon/start_linux.go index 8b24bcf87c..dd7c4f5b77 100644 --- a/daemon/start_linux.go +++ b/daemon/start_linux.go @@ -6,8 +6,8 @@ import ( "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/container" + "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/errdefs" - "github.com/docker/docker/libcontainerd/types" "github.com/docker/docker/oci" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/start_notlinux.go b/daemon/start_notlinux.go index 8b8135ab50..32c0ee62bf 100644 --- a/daemon/start_notlinux.go +++ b/daemon/start_notlinux.go @@ -7,7 +7,7 @@ import ( "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/container" - "github.com/docker/docker/libcontainerd/types" + "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/top_unix.go b/daemon/top_unix.go index 2d969c1f5b..d92313247f 100644 --- a/daemon/top_unix.go +++ b/daemon/top_unix.go @@ -12,9 +12,9 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/errdefs" "github.com/docker/docker/internal/lazyregexp" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" "github.com/pkg/errors" ) diff --git a/daemon/top_windows.go b/daemon/top_windows.go index 89a73049b4..3fc6b52a6b 100644 --- a/daemon/top_windows.go +++ b/daemon/top_windows.go @@ -7,7 +7,7 @@ import ( "time" "github.com/docker/docker/api/types/container" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/go-units" ) diff --git a/daemon/update_linux.go b/daemon/update_linux.go index 415ef943a6..f580753c17 100644 --- a/daemon/update_linux.go +++ b/daemon/update_linux.go @@ -4,7 +4,7 @@ import ( "time" "github.com/docker/docker/api/types/container" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/update_windows.go b/daemon/update_windows.go index cdfad12f4c..8410556545 100644 --- a/daemon/update_windows.go +++ b/daemon/update_windows.go @@ -2,7 +2,7 @@ package daemon import ( "github.com/docker/docker/api/types/container" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" ) func toContainerdResources(resources container.Resources) *libcontainerdtypes.Resources { diff --git a/libcontainerd/libcontainerd_linux.go b/libcontainerd/libcontainerd_linux.go index 671d7576ef..3268437cc8 100644 --- a/libcontainerd/libcontainerd_linux.go +++ b/libcontainerd/libcontainerd_linux.go @@ -5,7 +5,7 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/docker/docker/daemon/internal/libcontainerd/remote" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" ) // NewClient creates a new libcontainerd client from a containerd client diff --git a/libcontainerd/libcontainerd_windows.go b/libcontainerd/libcontainerd_windows.go index 49187069b6..ef303e1dde 100644 --- a/libcontainerd/libcontainerd_windows.go +++ b/libcontainerd/libcontainerd_windows.go @@ -6,7 +6,7 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/docker/docker/daemon/internal/libcontainerd/local" "github.com/docker/docker/daemon/internal/libcontainerd/remote" - libcontainerdtypes "github.com/docker/docker/libcontainerd/types" + libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/pkg/system" ) diff --git a/libcontainerd/replace.go b/libcontainerd/replace.go index 4fd80aca4b..8424a0a7de 100644 --- a/libcontainerd/replace.go +++ b/libcontainerd/replace.go @@ -9,7 +9,7 @@ import ( "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" - "github.com/docker/docker/libcontainerd/types" + "github.com/docker/docker/daemon/internal/libcontainerd/types" ) // ReplaceContainer creates a new container, replacing any existing container From 90f9ce14f19795dd7025935f94a3a90da4b4b326 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Jun 2025 14:29:12 -0700 Subject: [PATCH 14/14] Move libcontainerd to daemon/internal/libcontainerd Signed-off-by: Derek McGowan --- .../internal/libcontainerd}/libcontainerd_linux.go | 0 .../internal/libcontainerd}/libcontainerd_windows.go | 0 {libcontainerd => daemon/internal/libcontainerd}/replace.go | 0 daemon/internal/plugin/executor/containerd/containerd.go | 2 +- daemon/start.go | 2 +- 5 files changed, 2 insertions(+), 2 deletions(-) rename {libcontainerd => daemon/internal/libcontainerd}/libcontainerd_linux.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/libcontainerd_windows.go (100%) rename {libcontainerd => daemon/internal/libcontainerd}/replace.go (100%) diff --git a/libcontainerd/libcontainerd_linux.go b/daemon/internal/libcontainerd/libcontainerd_linux.go similarity index 100% rename from libcontainerd/libcontainerd_linux.go rename to daemon/internal/libcontainerd/libcontainerd_linux.go diff --git a/libcontainerd/libcontainerd_windows.go b/daemon/internal/libcontainerd/libcontainerd_windows.go similarity index 100% rename from libcontainerd/libcontainerd_windows.go rename to daemon/internal/libcontainerd/libcontainerd_windows.go diff --git a/libcontainerd/replace.go b/daemon/internal/libcontainerd/replace.go similarity index 100% rename from libcontainerd/replace.go rename to daemon/internal/libcontainerd/replace.go diff --git a/daemon/internal/plugin/executor/containerd/containerd.go b/daemon/internal/plugin/executor/containerd/containerd.go index 83a077ffd8..bb33a9552d 100644 --- a/daemon/internal/plugin/executor/containerd/containerd.go +++ b/daemon/internal/plugin/executor/containerd/containerd.go @@ -11,9 +11,9 @@ import ( "github.com/containerd/containerd/v2/pkg/cio" cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" + "github.com/docker/docker/daemon/internal/libcontainerd" libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/errdefs" - "github.com/docker/docker/libcontainerd" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) diff --git a/daemon/start.go b/daemon/start.go index 321e99a66a..1523b3dcaf 100644 --- a/daemon/start.go +++ b/daemon/start.go @@ -11,10 +11,10 @@ import ( "github.com/docker/docker/api/types/events" "github.com/docker/docker/daemon/container" mobyc8dstore "github.com/docker/docker/daemon/containerd" + "github.com/docker/docker/daemon/internal/libcontainerd" "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" "github.com/docker/docker/internal/otelutil" - "github.com/docker/docker/libcontainerd" "github.com/pkg/errors" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute"