Skip to content

Commit 74e9aa7

Browse files
author
Kazuyoshi Kato
committed
snapshots/devmapper: don't hardcord the platform strings
The snapshotter doesn't have to exclude non-amd64 platforms. Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
1 parent 0f08a55 commit 74e9aa7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

snapshots/devmapper/snapshotter.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ import (
3030
"github.com/containerd/containerd/errdefs"
3131
"github.com/containerd/containerd/log"
3232
"github.com/containerd/containerd/mount"
33+
"github.com/containerd/containerd/platforms"
3334
"github.com/containerd/containerd/plugin"
3435
"github.com/containerd/containerd/snapshots"
3536
"github.com/containerd/containerd/snapshots/devmapper/dmsetup"
3637
"github.com/containerd/containerd/snapshots/storage"
3738
"github.com/hashicorp/go-multierror"
38-
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
3939
"github.com/pkg/errors"
4040
"github.com/sirupsen/logrus"
4141
)
@@ -46,10 +46,7 @@ func init() {
4646
ID: "devmapper",
4747
Config: &Config{},
4848
InitFn: func(ic *plugin.InitContext) (interface{}, error) {
49-
ic.Meta.Platforms = append(ic.Meta.Platforms, ocispec.Platform{
50-
OS: "linux",
51-
Architecture: "amd64",
52-
})
49+
ic.Meta.Platforms = append(ic.Meta.Platforms, platforms.DefaultSpec())
5350

5451
config, ok := ic.Config.(*Config)
5552
if !ok {

0 commit comments

Comments
 (0)