containerd: compile tags to exclude btrfs

Leave in btrfs by default, but add go build tags to exclude it.
`go build -tags containerd_no_btrfs` will leave that driver out.
As the current containerd/btrfs code needs link to libbtrfs*.so, but not
all distros provide it.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-05-04 17:30:23 -04:00
parent ae93c236ff
commit 55bf3c10f0
No known key found for this signature in database
GPG Key ID: 10937E57733F1362
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,5 @@
// +build !containerd_no_btrfs
package main
import _ "github.com/containerd/containerd/snapshot/btrfs"

View File

@ -3,6 +3,5 @@ package main
import ( import (
_ "github.com/containerd/containerd/linux" _ "github.com/containerd/containerd/linux"
_ "github.com/containerd/containerd/metrics/cgroups" _ "github.com/containerd/containerd/metrics/cgroups"
_ "github.com/containerd/containerd/snapshot/btrfs"
_ "github.com/containerd/containerd/snapshot/overlay" _ "github.com/containerd/containerd/snapshot/overlay"
) )