diff --git a/builder/builder-next/adapters/containerimage/pull.go b/builder/builder-next/adapters/containerimage/pull.go index 0926b36ade..0cf7358822 100644 --- a/builder/builder-next/adapters/containerimage/pull.go +++ b/builder/builder-next/adapters/containerimage/pull.go @@ -22,7 +22,6 @@ import ( "github.com/containerd/containerd/remotes/docker/schema1" distreference "github.com/docker/distribution/reference" dimages "github.com/docker/docker/daemon/images" - "github.com/docker/docker/distribution" "github.com/docker/docker/distribution/metadata" "github.com/docker/docker/distribution/xfer" "github.com/docker/docker/image" @@ -52,7 +51,7 @@ type SourceOpt struct { ContentStore content.Store CacheAccessor cache.Accessor ReferenceStore reference.Store - DownloadManager distribution.RootFSDownloadManager + DownloadManager *xfer.LayerDownloadManager MetadataStore metadata.V2MetadataService ImageStore image.Store RegistryHosts docker.RegistryHosts diff --git a/builder/builder-next/worker/worker.go b/builder/builder-next/worker/worker.go index 9476cb20a9..b02e206470 100644 --- a/builder/builder-next/worker/worker.go +++ b/builder/builder-next/worker/worker.go @@ -14,7 +14,6 @@ import ( "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/rootfs" "github.com/docker/docker/builder/builder-next/adapters/containerimage" - "github.com/docker/docker/distribution" distmetadata "github.com/docker/docker/distribution/metadata" "github.com/docker/docker/distribution/xfer" "github.com/docker/docker/image" @@ -70,7 +69,7 @@ type Opt struct { ContentStore content.Store CacheManager cache.Manager ImageSource *containerimage.Source - DownloadManager distribution.RootFSDownloadManager + DownloadManager *xfer.LayerDownloadManager V2MetadataService distmetadata.V2MetadataService Transport nethttp.RoundTripper Exporter exporter.Exporter diff --git a/daemon/images/service.go b/daemon/images/service.go index 85c3bd5d40..67883df81d 100644 --- a/daemon/images/service.go +++ b/daemon/images/service.go @@ -11,7 +11,6 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/container" daemonevents "github.com/docker/docker/daemon/events" - "github.com/docker/docker/distribution" "github.com/docker/docker/distribution/metadata" "github.com/docker/docker/distribution/xfer" "github.com/docker/docker/image" @@ -95,7 +94,7 @@ type ImageService struct { // DistributionServices provides daemon image storage services type DistributionServices struct { - DownloadManager distribution.RootFSDownloadManager + DownloadManager *xfer.LayerDownloadManager V2MetadataService metadata.V2MetadataService LayerStore layer.Store ImageStore image.Store diff --git a/distribution/config.go b/distribution/config.go index 48b0b46e26..220697f060 100644 --- a/distribution/config.go +++ b/distribution/config.go @@ -56,7 +56,7 @@ type ImagePullConfig struct { Config // DownloadManager manages concurrent pulls. - DownloadManager RootFSDownloadManager + DownloadManager *xfer.LayerDownloadManager // Schema2Types is the valid schema2 configuration types allowed // by the pull operation. Schema2Types []string @@ -107,15 +107,6 @@ type PushLayer interface { Release() } -// RootFSDownloadManager handles downloading of the rootfs -type RootFSDownloadManager interface { - // Download downloads the layers into the given initial rootfs and - // returns the final rootfs. - // Given progress output to track download progress - // Returns function to release download resources - Download(ctx context.Context, initialRootFS image.RootFS, os string, layers []xfer.DownloadDescriptor, progressOutput progress.Output) (image.RootFS, func(), error) -} - type imageConfigStore struct { image.Store }