diff --git a/BUILDING.md b/BUILDING.md index 3b0b0d770..27a056e6d 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -104,6 +104,7 @@ make generate > * `no_btrfs`: A build tag disables building the btrfs snapshot driver. > * `no_cri`: A build tag disables building Kubernetes [CRI](http://blog.kubernetes.io/2016/12/container-runtime-interface-cri-in-kubernetes.html) support into containerd. > See [here](https://github.com/containerd/cri-containerd#build-tags) for build tags of CRI plugin. +> * `no_devmapper`: A build tag disables building the device mapper snapshot driver. > > For example, adding `BUILDTAGS=no_btrfs` to your environment before calling the **binaries** > Makefile target will disable the btrfs driver within the containerd Go build. diff --git a/cmd/containerd/builtins_devmapper_linux.go b/cmd/containerd/builtins_devmapper_linux.go new file mode 100644 index 000000000..aada976b3 --- /dev/null +++ b/cmd/containerd/builtins_devmapper_linux.go @@ -0,0 +1,21 @@ +// +build !no_devmapper + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package main + +import _ "github.com/containerd/containerd/snapshots/devmapper" diff --git a/cmd/containerd/builtins_linux.go b/cmd/containerd/builtins_linux.go index 7804664c2..6c56744df 100644 --- a/cmd/containerd/builtins_linux.go +++ b/cmd/containerd/builtins_linux.go @@ -22,7 +22,6 @@ import ( _ "github.com/containerd/containerd/runtime/v1/linux" _ "github.com/containerd/containerd/runtime/v2" _ "github.com/containerd/containerd/runtime/v2/runc/options" - _ "github.com/containerd/containerd/snapshots/devmapper" _ "github.com/containerd/containerd/snapshots/native" _ "github.com/containerd/containerd/snapshots/overlay" _ "github.com/containerd/zfs"