diff --git a/daemon/builder/backend/backend.go b/daemon/builder/backend/backend.go index 445c14c34d..7e7ba550fc 100644 --- a/daemon/builder/backend/backend.go +++ b/daemon/builder/backend/backend.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/daemon/builder" daemonevents "github.com/docker/docker/daemon/events" buildkit "github.com/docker/docker/daemon/internal/builder-next" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/pkg/stringid" "github.com/moby/moby/api/types/backend" "github.com/moby/moby/api/types/build" diff --git a/daemon/builder/backend/tag.go b/daemon/builder/backend/tag.go index c77ede74f1..c87c38b461 100644 --- a/daemon/builder/backend/tag.go +++ b/daemon/builder/backend/tag.go @@ -6,7 +6,7 @@ import ( "io" "github.com/distribution/reference" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" "github.com/pkg/errors" ) diff --git a/daemon/builder/builder.go b/daemon/builder/builder.go index c371e30fb6..6a89754677 100644 --- a/daemon/builder/builder.go +++ b/daemon/builder/builder.go @@ -8,8 +8,8 @@ import ( "context" "io" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/moby/moby/api/types/backend" "github.com/moby/moby/api/types/container" "github.com/opencontainers/go-digest" diff --git a/daemon/builder/dockerfile/dispatchers.go b/daemon/builder/dockerfile/dispatchers.go index 9cc6dff4b9..0581bfc0a2 100644 --- a/daemon/builder/dockerfile/dispatchers.go +++ b/daemon/builder/dockerfile/dispatchers.go @@ -17,8 +17,8 @@ import ( "github.com/containerd/platforms" "github.com/docker/docker/daemon/builder" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/go-connections/nat" "github.com/moby/buildkit/frontend/dockerfile/instructions" diff --git a/daemon/builder/dockerfile/dispatchers_test.go b/daemon/builder/dockerfile/dispatchers_test.go index f05f7515d0..8fbaa6978d 100644 --- a/daemon/builder/dockerfile/dispatchers_test.go +++ b/daemon/builder/dockerfile/dispatchers_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/docker/docker/daemon/builder" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/oci" "github.com/docker/go-connections/nat" "github.com/moby/buildkit/frontend/dockerfile/instructions" diff --git a/daemon/builder/dockerfile/evaluator.go b/daemon/builder/dockerfile/evaluator.go index 4dddc714ad..a4cc260622 100644 --- a/daemon/builder/dockerfile/evaluator.go +++ b/daemon/builder/dockerfile/evaluator.go @@ -26,8 +26,8 @@ import ( "strings" "github.com/docker/docker/daemon/builder" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/docker/docker/oci" "github.com/moby/buildkit/frontend/dockerfile/instructions" "github.com/moby/buildkit/frontend/dockerfile/shell" diff --git a/daemon/builder/dockerfile/imagecontext.go b/daemon/builder/dockerfile/imagecontext.go index 98ea2fc3db..dd96934231 100644 --- a/daemon/builder/dockerfile/imagecontext.go +++ b/daemon/builder/dockerfile/imagecontext.go @@ -7,7 +7,7 @@ import ( "github.com/containerd/log" "github.com/containerd/platforms" "github.com/docker/docker/daemon/builder" - dockerimage "github.com/docker/docker/image" + dockerimage "github.com/docker/docker/daemon/internal/image" "github.com/moby/moby/api/types/backend" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" diff --git a/daemon/builder/dockerfile/imagecontext_test.go b/daemon/builder/dockerfile/imagecontext_test.go index d5a5e1d15f..ed769bc188 100644 --- a/daemon/builder/dockerfile/imagecontext_test.go +++ b/daemon/builder/dockerfile/imagecontext_test.go @@ -8,7 +8,7 @@ import ( "github.com/containerd/platforms" "github.com/docker/docker/daemon/builder" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "gotest.tools/v3/assert" ) diff --git a/daemon/builder/dockerfile/internals.go b/daemon/builder/dockerfile/internals.go index a27d4139ac..8b2e67e576 100644 --- a/daemon/builder/dockerfile/internals.go +++ b/daemon/builder/dockerfile/internals.go @@ -13,8 +13,8 @@ import ( "github.com/containerd/log" "github.com/containerd/platforms" "github.com/docker/docker/daemon/builder" + "github.com/docker/docker/daemon/internal/image" networkSettings "github.com/docker/docker/daemon/network" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/stringid" "github.com/docker/go-connections/nat" "github.com/moby/go-archive" diff --git a/daemon/builder/dockerfile/internals_test.go b/daemon/builder/dockerfile/internals_test.go index e1ffac9f3b..af88d1c6a5 100644 --- a/daemon/builder/dockerfile/internals_test.go +++ b/daemon/builder/dockerfile/internals_test.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/daemon/builder" "github.com/docker/docker/daemon/builder/remotecontext" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/docker/go-connections/nat" "github.com/moby/go-archive" "github.com/moby/moby/api/types/backend" diff --git a/daemon/builder/dockerfile/mockbackend_test.go b/daemon/builder/dockerfile/mockbackend_test.go index 8ded9fed19..5ccf9e0732 100644 --- a/daemon/builder/dockerfile/mockbackend_test.go +++ b/daemon/builder/dockerfile/mockbackend_test.go @@ -7,8 +7,8 @@ import ( "runtime" "github.com/docker/docker/daemon/builder" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/moby/moby/api/types/backend" "github.com/moby/moby/api/types/container" "github.com/opencontainers/go-digest" diff --git a/daemon/cluster/executor/backend.go b/daemon/cluster/executor/backend.go index 44c4614311..8cd0b743fb 100644 --- a/daemon/cluster/executor/backend.go +++ b/daemon/cluster/executor/backend.go @@ -8,13 +8,13 @@ import ( "github.com/distribution/reference" "github.com/docker/distribution" clustertypes "github.com/docker/docker/daemon/cluster/provider" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/libnetwork" "github.com/docker/docker/daemon/libnetwork/cluster" networktypes "github.com/docker/docker/daemon/libnetwork/types" networkSettings "github.com/docker/docker/daemon/network" "github.com/docker/docker/daemon/pkg/plugin" volumeopts "github.com/docker/docker/daemon/volume/service/opts" - "github.com/docker/docker/image" "github.com/moby/moby/api/types/backend" "github.com/moby/moby/api/types/container" "github.com/moby/moby/api/types/events" diff --git a/daemon/container.go b/daemon/container.go index b408df258e..3d8fec6429 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -17,11 +17,11 @@ import ( "github.com/containerd/log" "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/container" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/network" "github.com/docker/docker/daemon/pkg/opts" volumemounts "github.com/docker/docker/daemon/volume/mounts" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/docker/docker/oci/caps" "github.com/docker/go-connections/nat" containertypes "github.com/moby/moby/api/types/container" diff --git a/daemon/container/container.go b/daemon/container/container.go index 861b3b6cb7..1d0cda9c41 100644 --- a/daemon/container/container.go +++ b/daemon/container/container.go @@ -17,6 +17,7 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/platforms" + "github.com/docker/docker/daemon/internal/image" libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/daemon/internal/restartmanager" "github.com/docker/docker/daemon/internal/stream" @@ -28,7 +29,6 @@ import ( "github.com/docker/docker/daemon/volume" volumemounts "github.com/docker/docker/daemon/volume/mounts" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/docker/docker/oci" "github.com/docker/go-units" containertypes "github.com/moby/moby/api/types/container" diff --git a/daemon/containerd/cache.go b/daemon/containerd/cache.go index 70092788e3..de7e2e4f7d 100644 --- a/daemon/containerd/cache.go +++ b/daemon/containerd/cache.go @@ -10,10 +10,10 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/docker/docker/daemon/builder" + "github.com/docker/docker/daemon/internal/image" + "github.com/docker/docker/daemon/internal/image/cache" "github.com/docker/docker/daemon/internal/layer" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" - "github.com/docker/docker/image/cache" "github.com/docker/docker/internal/multierror" "github.com/moby/moby/api/types/backend" "github.com/moby/moby/api/types/container" diff --git a/daemon/containerd/image.go b/daemon/containerd/image.go index d77a3c3d7c..71e0ad3e86 100644 --- a/daemon/containerd/image.go +++ b/daemon/containerd/image.go @@ -13,8 +13,8 @@ import ( "github.com/containerd/platforms" "github.com/distribution/reference" "github.com/docker/docker/daemon/images" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" imagespec "github.com/moby/docker-image-spec/specs-go/v1" "github.com/moby/moby/api/types/backend" "github.com/opencontainers/go-digest" diff --git a/daemon/containerd/image_builder.go b/daemon/containerd/image_builder.go index f44256f612..6d9c1c3683 100644 --- a/daemon/containerd/image_builder.go +++ b/daemon/containerd/image_builder.go @@ -22,9 +22,9 @@ import ( "github.com/containerd/platforms" "github.com/distribution/reference" "github.com/docker/docker/daemon/builder" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/streamformatter" "github.com/docker/docker/pkg/stringid" diff --git a/daemon/containerd/image_children.go b/daemon/containerd/image_children.go index 74af3ec3e7..36c7a01ae3 100644 --- a/daemon/containerd/image_children.go +++ b/daemon/containerd/image_children.go @@ -4,8 +4,8 @@ import ( "context" c8dimages "github.com/containerd/containerd/v2/core/images" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/opencontainers/go-digest" "github.com/pkg/errors" ) diff --git a/daemon/containerd/image_commit.go b/daemon/containerd/image_commit.go index 64ba0afb2a..4bea66524f 100644 --- a/daemon/containerd/image_commit.go +++ b/daemon/containerd/image_commit.go @@ -16,7 +16,7 @@ import ( "github.com/containerd/containerd/v2/core/snapshots" cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" imagespec "github.com/moby/docker-image-spec/specs-go/v1" "github.com/moby/go-archive" "github.com/moby/moby/api/types/backend" diff --git a/daemon/containerd/image_delete.go b/daemon/containerd/image_delete.go index 18c3b1ee6a..2af35289d8 100644 --- a/daemon/containerd/image_delete.go +++ b/daemon/containerd/image_delete.go @@ -16,8 +16,8 @@ import ( "github.com/distribution/reference" "github.com/docker/docker/daemon/container" dimages "github.com/docker/docker/daemon/images" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/metrics" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/stringid" "github.com/moby/moby/api/types/events" imagetypes "github.com/moby/moby/api/types/image" diff --git a/daemon/containerd/image_import.go b/daemon/containerd/image_import.go index bb68529f82..717d12302e 100644 --- a/daemon/containerd/image_import.go +++ b/daemon/containerd/image_import.go @@ -16,8 +16,8 @@ import ( "github.com/containerd/platforms" "github.com/distribution/reference" "github.com/docker/docker/daemon/builder/dockerfile" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/pools" "github.com/google/uuid" imagespec "github.com/moby/docker-image-spec/specs-go/v1" diff --git a/daemon/containerd/image_snapshot.go b/daemon/containerd/image_snapshot.go index cf24f0bf37..76cef9a708 100644 --- a/daemon/containerd/image_snapshot.go +++ b/daemon/containerd/image_snapshot.go @@ -12,10 +12,10 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/docker/docker/daemon/container" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" "github.com/docker/docker/daemon/snapshotter" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/opencontainers/image-spec/identity" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" diff --git a/daemon/containerd/image_tag.go b/daemon/containerd/image_tag.go index 8494eb92af..115d37c0b2 100644 --- a/daemon/containerd/image_tag.go +++ b/daemon/containerd/image_tag.go @@ -8,8 +8,8 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/distribution/reference" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/moby/moby/api/types/events" "github.com/pkg/errors" ) diff --git a/daemon/containerd/imagespec.go b/daemon/containerd/imagespec.go index 451f8a3760..790443076d 100644 --- a/daemon/containerd/imagespec.go +++ b/daemon/containerd/imagespec.go @@ -6,8 +6,8 @@ package containerd import ( "slices" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/dockerversion" - "github.com/docker/docker/image" "github.com/docker/go-connections/nat" imagespec "github.com/moby/docker-image-spec/specs-go/v1" "github.com/moby/moby/api/types/container" diff --git a/daemon/containerd/service_unix.go b/daemon/containerd/service_unix.go index 3a3a028eda..43c3b98623 100644 --- a/daemon/containerd/service_unix.go +++ b/daemon/containerd/service_unix.go @@ -4,8 +4,8 @@ package containerd import ( "github.com/docker/docker/daemon/container" + "github.com/docker/docker/daemon/internal/image" "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 6a2a274a48..8d64f756a8 100644 --- a/daemon/containerd/service_windows.go +++ b/daemon/containerd/service_windows.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/docker/docker/daemon/container" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" "github.com/pkg/errors" ) diff --git a/daemon/create.go b/daemon/create.go index 47bdd3160d..1e74242a48 100644 --- a/daemon/create.go +++ b/daemon/create.go @@ -17,9 +17,9 @@ import ( "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/images" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "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 cd8f41ddc1..3be327fda5 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -41,6 +41,7 @@ import ( "github.com/docker/docker/daemon/images" "github.com/docker/docker/daemon/internal/distribution" dmetadata "github.com/docker/docker/daemon/internal/distribution/metadata" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types" "github.com/docker/docker/daemon/internal/metrics" @@ -57,7 +58,6 @@ import ( "github.com/docker/docker/daemon/stats" volumesservice "github.com/docker/docker/daemon/volume/service" "github.com/docker/docker/dockerversion" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/authorization" "github.com/docker/docker/pkg/fileutils" "github.com/docker/docker/pkg/idtools" diff --git a/daemon/image_service.go b/daemon/image_service.go index 9cded70429..f036c40dd3 100644 --- a/daemon/image_service.go +++ b/daemon/image_service.go @@ -8,8 +8,8 @@ import ( "github.com/docker/docker/daemon/builder" "github.com/docker/docker/daemon/container" "github.com/docker/docker/daemon/images" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/moby/go-archive" "github.com/moby/moby/api/types/backend" "github.com/moby/moby/api/types/events" diff --git a/daemon/images/cache.go b/daemon/images/cache.go index 76cb272845..8af58be83b 100644 --- a/daemon/images/cache.go +++ b/daemon/images/cache.go @@ -7,9 +7,9 @@ import ( "github.com/containerd/log" "github.com/docker/docker/daemon/builder" + "github.com/docker/docker/daemon/internal/image" + "github.com/docker/docker/daemon/internal/image/cache" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" - "github.com/docker/docker/image/cache" "github.com/moby/moby/api/types/backend" ) diff --git a/daemon/images/image.go b/daemon/images/image.go index 7c28db109c..76bb137332 100644 --- a/daemon/images/image.go +++ b/daemon/images/image.go @@ -13,8 +13,8 @@ import ( "github.com/containerd/log" "github.com/containerd/platforms" "github.com/distribution/reference" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/moby/moby/api/types/backend" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/daemon/images/image_builder.go b/daemon/images/image_builder.go index 734850b9c9..8508f55cdf 100644 --- a/daemon/images/image_builder.go +++ b/daemon/images/image_builder.go @@ -10,8 +10,8 @@ import ( "github.com/containerd/platforms" "github.com/distribution/reference" "github.com/docker/docker/daemon/builder" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/streamformatter" "github.com/docker/docker/pkg/stringid" diff --git a/daemon/images/image_commit.go b/daemon/images/image_commit.go index 4117e2bcb0..8e55b2f395 100644 --- a/daemon/images/image_commit.go +++ b/daemon/images/image_commit.go @@ -5,8 +5,8 @@ import ( "encoding/json" "io" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/ioutils" "github.com/moby/moby/api/types/backend" "github.com/moby/moby/api/types/events" diff --git a/daemon/images/image_delete.go b/daemon/images/image_delete.go index ee7d88c7e5..d007ecf3ef 100644 --- a/daemon/images/image_delete.go +++ b/daemon/images/image_delete.go @@ -8,9 +8,9 @@ import ( "github.com/distribution/reference" "github.com/docker/docker/daemon/container" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/metrics" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/stringid" "github.com/moby/moby/api/types/backend" "github.com/moby/moby/api/types/events" diff --git a/daemon/images/image_exporter.go b/daemon/images/image_exporter.go index 08cec7c68f..3fcf0b3183 100644 --- a/daemon/images/image_exporter.go +++ b/daemon/images/image_exporter.go @@ -4,8 +4,8 @@ import ( "context" "io" + "github.com/docker/docker/daemon/internal/image/tarexport" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image/tarexport" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" ) diff --git a/daemon/images/image_import.go b/daemon/images/image_import.go index be9b6b4b70..9a237a78f4 100644 --- a/daemon/images/image_import.go +++ b/daemon/images/image_import.go @@ -9,10 +9,10 @@ import ( "github.com/containerd/platforms" "github.com/distribution/reference" "github.com/docker/docker/daemon/builder/dockerfile" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" "github.com/docker/docker/dockerversion" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/moby/go-archive/compression" "github.com/moby/moby/api/types/container" "github.com/moby/moby/api/types/events" diff --git a/daemon/images/image_inspect.go b/daemon/images/image_inspect.go index 150965deee..2ad6b7a6e7 100644 --- a/daemon/images/image_inspect.go +++ b/daemon/images/image_inspect.go @@ -5,8 +5,8 @@ import ( "time" "github.com/distribution/reference" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/moby/moby/api/types/backend" imagetypes "github.com/moby/moby/api/types/image" "github.com/moby/moby/api/types/storage" diff --git a/daemon/images/image_list.go b/daemon/images/image_list.go index e4e7a83aa0..42b0bdbfa5 100644 --- a/daemon/images/image_list.go +++ b/daemon/images/image_list.go @@ -9,8 +9,8 @@ import ( "github.com/distribution/reference" "github.com/docker/docker/daemon/container" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/moby/moby/api/types/backend" imagetypes "github.com/moby/moby/api/types/image" timetypes "github.com/moby/moby/api/types/time" diff --git a/daemon/images/image_prune.go b/daemon/images/image_prune.go index 4d4fa22787..972c78bfc7 100644 --- a/daemon/images/image_prune.go +++ b/daemon/images/image_prune.go @@ -8,9 +8,9 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/distribution/reference" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/moby/moby/api/types/events" "github.com/moby/moby/api/types/filters" imagetypes "github.com/moby/moby/api/types/image" diff --git a/daemon/images/image_squash.go b/daemon/images/image_squash.go index 37d7b70bba..a43bb99422 100644 --- a/daemon/images/image_squash.go +++ b/daemon/images/image_squash.go @@ -5,8 +5,8 @@ import ( "fmt" "time" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/pkg/errors" ) diff --git a/daemon/images/image_tag.go b/daemon/images/image_tag.go index 0bbcaac2b4..94b56a3acf 100644 --- a/daemon/images/image_tag.go +++ b/daemon/images/image_tag.go @@ -4,7 +4,7 @@ import ( "context" "github.com/distribution/reference" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" "github.com/moby/moby/api/types/events" ) diff --git a/daemon/images/image_unix.go b/daemon/images/image_unix.go index 7699c2f2bb..fe28713613 100644 --- a/daemon/images/image_unix.go +++ b/daemon/images/image_unix.go @@ -7,7 +7,7 @@ import ( "github.com/containerd/log" "github.com/docker/docker/daemon/container" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" ) // GetLayerFolders returns the layer folders from an image RootFS diff --git a/daemon/images/image_windows.go b/daemon/images/image_windows.go index b434bf63bc..393df20c66 100644 --- a/daemon/images/image_windows.go +++ b/daemon/images/image_windows.go @@ -4,8 +4,8 @@ import ( "context" "github.com/docker/docker/daemon/container" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/pkg/errors" ) diff --git a/daemon/images/service.go b/daemon/images/service.go index c722ece67f..b6440b0d9f 100644 --- a/daemon/images/service.go +++ b/daemon/images/service.go @@ -14,8 +14,8 @@ import ( "github.com/docker/docker/daemon/internal/distribution" "github.com/docker/docker/daemon/internal/distribution/metadata" "github.com/docker/docker/daemon/internal/distribution/xfer" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" refstore "github.com/docker/docker/reference" "github.com/opencontainers/go-digest" "github.com/pkg/errors" diff --git a/daemon/images/store.go b/daemon/images/store.go index b76da4c4f0..4bbfd4520a 100644 --- a/daemon/images/store.go +++ b/daemon/images/store.go @@ -10,8 +10,8 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/docker/docker/daemon/internal/distribution" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/opencontainers/go-digest" "github.com/pkg/errors" ) diff --git a/daemon/images/store_test.go b/daemon/images/store_test.go index fac1384771..3102c40961 100644 --- a/daemon/images/store_test.go +++ b/daemon/images/store_test.go @@ -12,7 +12,7 @@ import ( "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/containerd/v2/plugins/content/local" cerrdefs "github.com/containerd/errdefs" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" bolt "go.etcd.io/bbolt" diff --git a/daemon/internal/builder-next/adapters/containerimage/pull.go b/daemon/internal/builder-next/adapters/containerimage/pull.go index 90f13138fb..778c7c47b5 100644 --- a/daemon/internal/builder-next/adapters/containerimage/pull.go +++ b/daemon/internal/builder-next/adapters/containerimage/pull.go @@ -28,8 +28,8 @@ import ( dimages "github.com/docker/docker/daemon/images" "github.com/docker/docker/daemon/internal/distribution/metadata" "github.com/docker/docker/daemon/internal/distribution/xfer" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" pkgprogress "github.com/docker/docker/pkg/progress" refstore "github.com/docker/docker/reference" "github.com/moby/buildkit/cache" diff --git a/daemon/internal/builder-next/adapters/localinlinecache/inlinecache.go b/daemon/internal/builder-next/adapters/localinlinecache/inlinecache.go index ba3fbab528..ca1a559276 100644 --- a/daemon/internal/builder-next/adapters/localinlinecache/inlinecache.go +++ b/daemon/internal/builder-next/adapters/localinlinecache/inlinecache.go @@ -9,7 +9,7 @@ import ( c8dimages "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/remotes/docker" "github.com/distribution/reference" - imagestore "github.com/docker/docker/image" + imagestore "github.com/docker/docker/daemon/internal/image" refstore "github.com/docker/docker/reference" "github.com/moby/buildkit/cache/remotecache" registryremotecache "github.com/moby/buildkit/cache/remotecache/registry" diff --git a/daemon/internal/builder-next/exporter/mobyexporter/export.go b/daemon/internal/builder-next/exporter/mobyexporter/export.go index 22a9f34fd3..2fc76fdc9c 100644 --- a/daemon/internal/builder-next/exporter/mobyexporter/export.go +++ b/daemon/internal/builder-next/exporter/mobyexporter/export.go @@ -14,8 +14,8 @@ import ( "github.com/containerd/containerd/v2/core/leases" "github.com/containerd/log" "github.com/distribution/reference" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/moby/buildkit/exporter" "github.com/moby/buildkit/exporter/containerimage" "github.com/moby/buildkit/exporter/containerimage/exptypes" diff --git a/daemon/internal/builder-next/imagerefchecker/checker.go b/daemon/internal/builder-next/imagerefchecker/checker.go index 6dfce6e220..7975fec100 100644 --- a/daemon/internal/builder-next/imagerefchecker/checker.go +++ b/daemon/internal/builder-next/imagerefchecker/checker.go @@ -3,8 +3,8 @@ package imagerefchecker import ( "sync" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/moby/buildkit/cache" "github.com/opencontainers/go-digest" ) diff --git a/daemon/internal/distribution/config.go b/daemon/internal/distribution/config.go index 4a1c2b5871..f8cd1a0249 100644 --- a/daemon/internal/distribution/config.go +++ b/daemon/internal/distribution/config.go @@ -11,8 +11,8 @@ import ( "github.com/docker/distribution/manifest/schema2" "github.com/docker/docker/daemon/internal/distribution/metadata" "github.com/docker/docker/daemon/internal/distribution/xfer" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/progress" refstore "github.com/docker/docker/reference" registrypkg "github.com/docker/docker/registry" diff --git a/daemon/internal/distribution/pull_v2.go b/daemon/internal/distribution/pull_v2.go index ae195620be..633ab00e3a 100644 --- a/daemon/internal/distribution/pull_v2.go +++ b/daemon/internal/distribution/pull_v2.go @@ -19,8 +19,8 @@ import ( "github.com/docker/distribution/registry/client/transport" "github.com/docker/docker/daemon/internal/distribution/metadata" "github.com/docker/docker/daemon/internal/distribution/xfer" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/stringid" diff --git a/daemon/internal/distribution/pull_v2_test.go b/daemon/internal/distribution/pull_v2_test.go index 4968d94a48..6b1795238d 100644 --- a/daemon/internal/distribution/pull_v2_test.go +++ b/daemon/internal/distribution/pull_v2_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/distribution/reference" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/registry" registrytypes "github.com/moby/moby/api/types/registry" "github.com/opencontainers/go-digest" diff --git a/daemon/internal/distribution/pull_v2_windows.go b/daemon/internal/distribution/pull_v2_windows.go index 3d51ea2317..a48291cbb8 100644 --- a/daemon/internal/distribution/pull_v2_windows.go +++ b/daemon/internal/distribution/pull_v2_windows.go @@ -17,7 +17,7 @@ import ( "github.com/docker/distribution/manifest/manifestlist" "github.com/docker/distribution/manifest/schema2" "github.com/docker/distribution/registry/client/transport" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/daemon/internal/distribution/xfer/download.go b/daemon/internal/distribution/xfer/download.go index 26120ab00b..f0381fa45a 100644 --- a/daemon/internal/distribution/xfer/download.go +++ b/daemon/internal/distribution/xfer/download.go @@ -9,8 +9,8 @@ import ( "github.com/containerd/log" "github.com/docker/distribution" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/progress" "github.com/moby/go-archive/compression" diff --git a/image/cache/cache.go b/daemon/internal/image/cache/cache.go similarity index 99% rename from image/cache/cache.go rename to daemon/internal/image/cache/cache.go index 8c446f9ac3..bf03a3e8cc 100644 --- a/image/cache/cache.go +++ b/daemon/internal/image/cache/cache.go @@ -8,9 +8,9 @@ import ( "github.com/containerd/log" "github.com/docker/docker/daemon/builder" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" "github.com/docker/docker/dockerversion" - "github.com/docker/docker/image" containertypes "github.com/moby/moby/api/types/container" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" diff --git a/image/cache/compare.go b/daemon/internal/image/cache/compare.go similarity index 100% rename from image/cache/compare.go rename to daemon/internal/image/cache/compare.go diff --git a/image/cache/compare_test.go b/daemon/internal/image/cache/compare_test.go similarity index 100% rename from image/cache/compare_test.go rename to daemon/internal/image/cache/compare_test.go diff --git a/image/fs.go b/daemon/internal/image/fs.go similarity index 100% rename from image/fs.go rename to daemon/internal/image/fs.go diff --git a/image/fs_test.go b/daemon/internal/image/fs_test.go similarity index 100% rename from image/fs_test.go rename to daemon/internal/image/fs_test.go diff --git a/image/image.go b/daemon/internal/image/image.go similarity index 100% rename from image/image.go rename to daemon/internal/image/image.go diff --git a/image/image_os.go b/daemon/internal/image/image_os.go similarity index 100% rename from image/image_os.go rename to daemon/internal/image/image_os.go diff --git a/image/image_test.go b/daemon/internal/image/image_test.go similarity index 100% rename from image/image_test.go rename to daemon/internal/image/image_test.go diff --git a/image/rootfs.go b/daemon/internal/image/rootfs.go similarity index 100% rename from image/rootfs.go rename to daemon/internal/image/rootfs.go diff --git a/image/spec/README.md b/daemon/internal/image/spec/README.md similarity index 100% rename from image/spec/README.md rename to daemon/internal/image/spec/README.md diff --git a/image/spec/spec.md b/daemon/internal/image/spec/spec.md similarity index 100% rename from image/spec/spec.md rename to daemon/internal/image/spec/spec.md diff --git a/image/spec/v1.1.md b/daemon/internal/image/spec/v1.1.md similarity index 100% rename from image/spec/v1.1.md rename to daemon/internal/image/spec/v1.1.md diff --git a/image/spec/v1.2.md b/daemon/internal/image/spec/v1.2.md similarity index 100% rename from image/spec/v1.2.md rename to daemon/internal/image/spec/v1.2.md diff --git a/image/spec/v1.md b/daemon/internal/image/spec/v1.md similarity index 100% rename from image/spec/v1.md rename to daemon/internal/image/spec/v1.md diff --git a/image/store.go b/daemon/internal/image/store.go similarity index 100% rename from image/store.go rename to daemon/internal/image/store.go diff --git a/image/store_test.go b/daemon/internal/image/store_test.go similarity index 100% rename from image/store_test.go rename to daemon/internal/image/store_test.go diff --git a/image/tarexport/load.go b/daemon/internal/image/tarexport/load.go similarity index 99% rename from image/tarexport/load.go rename to daemon/internal/image/tarexport/load.go index 3d3ec55eb6..0b78931928 100644 --- a/image/tarexport/load.go +++ b/daemon/internal/image/tarexport/load.go @@ -15,8 +15,8 @@ import ( "github.com/containerd/log" "github.com/distribution/reference" "github.com/docker/distribution" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/docker/docker/internal/ioutils" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/streamformatter" diff --git a/image/tarexport/os_path.go b/daemon/internal/image/tarexport/os_path.go similarity index 100% rename from image/tarexport/os_path.go rename to daemon/internal/image/tarexport/os_path.go diff --git a/image/tarexport/save.go b/daemon/internal/image/tarexport/save.go similarity index 99% rename from image/tarexport/save.go rename to daemon/internal/image/tarexport/save.go index ebec180bd8..e6ba78808c 100644 --- a/image/tarexport/save.go +++ b/daemon/internal/image/tarexport/save.go @@ -16,9 +16,9 @@ import ( "github.com/containerd/platforms" "github.com/distribution/reference" "github.com/docker/distribution" + "github.com/docker/docker/daemon/internal/image" + v1 "github.com/docker/docker/daemon/internal/image/v1" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" - v1 "github.com/docker/docker/image/v1" "github.com/docker/docker/internal/ioutils" "github.com/docker/docker/pkg/system" "github.com/moby/go-archive" diff --git a/image/tarexport/tarexport.go b/daemon/internal/image/tarexport/tarexport.go similarity index 96% rename from image/tarexport/tarexport.go rename to daemon/internal/image/tarexport/tarexport.go index e1d4385edc..22382b20b3 100644 --- a/image/tarexport/tarexport.go +++ b/daemon/internal/image/tarexport/tarexport.go @@ -5,8 +5,8 @@ import ( "github.com/containerd/platforms" "github.com/docker/distribution" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" refstore "github.com/docker/docker/reference" "github.com/moby/moby/api/types/events" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/image/v1/imagev1.go b/daemon/internal/image/v1/imagev1.go similarity index 95% rename from image/v1/imagev1.go rename to daemon/internal/image/v1/imagev1.go index 98e251bea6..262b4539f2 100644 --- a/image/v1/imagev1.go +++ b/daemon/internal/image/v1/imagev1.go @@ -5,8 +5,8 @@ import ( "encoding/json" "github.com/containerd/log" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/internal/layer" - "github.com/docker/docker/image" "github.com/opencontainers/go-digest" ) diff --git a/daemon/list.go b/daemon/list.go index 3e19b4dc7f..504e775eb4 100644 --- a/daemon/list.go +++ b/daemon/list.go @@ -12,8 +12,8 @@ import ( cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/docker/docker/daemon/container" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/docker/go-connections/nat" "github.com/moby/moby/api/types/backend" containertypes "github.com/moby/moby/api/types/container" diff --git a/daemon/list_test.go b/daemon/list_test.go index 2012d4c21e..c364372ff3 100644 --- a/daemon/list_test.go +++ b/daemon/list_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/docker/docker/daemon/container" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" "github.com/google/uuid" containertypes "github.com/moby/moby/api/types/container" "github.com/moby/moby/api/types/filters" diff --git a/daemon/migration.go b/daemon/migration.go index ccef57a480..2fee629546 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/daemon/container" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/internal/multierror" "github.com/moby/moby/api/types/backend" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/daemon/migration_test.go b/daemon/migration_test.go index a60aea8908..498fd4b74f 100644 --- a/daemon/migration_test.go +++ b/daemon/migration_test.go @@ -7,7 +7,7 @@ import ( "github.com/containerd/platforms" "github.com/docker/docker/daemon/container" - "github.com/docker/docker/image" + "github.com/docker/docker/daemon/internal/image" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "gotest.tools/v3/assert" ) diff --git a/daemon/oci_windows.go b/daemon/oci_windows.go index 0b0f7d75ae..eecc16e678 100644 --- a/daemon/oci_windows.go +++ b/daemon/oci_windows.go @@ -14,8 +14,8 @@ import ( "github.com/containerd/log" "github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/container" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/docker/docker/oci" "github.com/moby/moby/api/types/backend" containertypes "github.com/moby/moby/api/types/container" diff --git a/daemon/server/router/image/backend.go b/daemon/server/router/image/backend.go index 822247eb66..c487609f6d 100644 --- a/daemon/server/router/image/backend.go +++ b/daemon/server/router/image/backend.go @@ -5,7 +5,7 @@ import ( "io" "github.com/distribution/reference" - dockerimage "github.com/docker/docker/image" + dockerimage "github.com/docker/docker/daemon/internal/image" "github.com/moby/moby/api/types/backend" "github.com/moby/moby/api/types/filters" "github.com/moby/moby/api/types/image" diff --git a/daemon/server/router/image/image_routes.go b/daemon/server/router/image/image_routes.go index 043b837031..680f0e6bf5 100644 --- a/daemon/server/router/image/image_routes.go +++ b/daemon/server/router/image/image_routes.go @@ -13,10 +13,10 @@ import ( "github.com/containerd/platforms" "github.com/distribution/reference" "github.com/docker/docker/daemon/builder/remotecontext" + "github.com/docker/docker/daemon/internal/image" "github.com/docker/docker/daemon/server/httputils" "github.com/docker/docker/dockerversion" "github.com/docker/docker/errdefs" - "github.com/docker/docker/image" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/streamformatter"