Skip to content

Commit

Permalink
fix(containerd): always [also] pull layers from linux/amd64
Browse files Browse the repository at this point in the history
Ensure linux/amd64 image layers are always pulled after layers for the
default platform. This makes bundle images built for linux
pullable on macos and windows.
  • Loading branch information
njhale committed Jul 23, 2020
1 parent 2168839 commit 03f64d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/image/containerdregistry/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/containerd/containerd/metadata"
"github.com/containerd/containerd/platforms"
"github.com/containerd/containerd/remotes"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/sirupsen/logrus"
bolt "go.etcd.io/bbolt"
)
Expand Down Expand Up @@ -99,7 +100,10 @@ func NewRegistry(options ...RegistryOption) (registry *Registry, err error) {
destroy: destroy,
log: config.Log,
resolver: resolver,
platform: platforms.Only(platforms.DefaultSpec()),
platform: platforms.Ordered(platforms.DefaultSpec(), specs.Platform{
OS: "linux",
Architecture: "amd64",
}),
}
return
}
Expand Down

0 comments on commit 03f64d5

Please sign in to comment.