From b95b8fb44cc1a0ba18f2575a5da4faa0b6e27a10 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Thu, 10 Mar 2022 20:48:16 -0800 Subject: [PATCH] package/nerdctl: new package nerdctl is a CLI for containerd (package docker-containerd) which is drop-in compatible with the Docker Daemon CLI. This allows using the lighter weight containerd daemon directly, instead of via the additional docker daemon. It also implements rootless mode. https://github.com/containerd/nerdctl Signed-off-by: Christian Stewart Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + package/Config.in | 1 + package/nerdctl/Config.in | 18 ++++++++++++++++++ package/nerdctl/nerdctl.hash | 3 +++ package/nerdctl/nerdctl.mk | 20 ++++++++++++++++++++ 5 files changed, 43 insertions(+) create mode 100644 package/nerdctl/Config.in create mode 100644 package/nerdctl/nerdctl.hash create mode 100644 package/nerdctl/nerdctl.mk diff --git a/DEVELOPERS b/DEVELOPERS index 6944d3129c..cb98c3883d 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -538,6 +538,7 @@ F: package/gocryptfs/ F: package/mbpfan/ F: package/moby-buildkit/ F: package/mosh/ +F: package/nerdctl/ F: package/pkg-golang.mk F: package/rtl8821au/ F: package/runc/ diff --git a/package/Config.in b/package/Config.in index 8ecf2295d3..4ff1fb2f3c 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2594,6 +2594,7 @@ menu "System tools" source "package/monit/Config.in" source "package/multipath-tools/Config.in" source "package/ncdu/Config.in" + source "package/nerdctl/Config.in" source "package/netifrc/Config.in" source "package/numactl/Config.in" source "package/nut/Config.in" diff --git a/package/nerdctl/Config.in b/package/nerdctl/Config.in new file mode 100644 index 0000000000..969b9bb40e --- /dev/null +++ b/package/nerdctl/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_NERDCTL + bool "nerdctl" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_USES_UCLIBC # containerd + depends on BR2_USE_MMU # util-linux + select BR2_PACKAGE_CONTAINERD # runtime + help + Docker-compatible CLI for containerd, controlling runc. + + https://github.com/containerd/nerdctl + +comment "nerdctl needs a glibc or musl toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_UCLIBC diff --git a/package/nerdctl/nerdctl.hash b/package/nerdctl/nerdctl.hash new file mode 100644 index 0000000000..22cc97c362 --- /dev/null +++ b/package/nerdctl/nerdctl.hash @@ -0,0 +1,3 @@ +# Computed locally +sha256 be41804ef139a3f92b774edc8439678e56b44033d7ab3fcf4389f0865c1fe069 nerdctl-0.17.1.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/package/nerdctl/nerdctl.mk b/package/nerdctl/nerdctl.mk new file mode 100644 index 0000000000..3f3c04aa11 --- /dev/null +++ b/package/nerdctl/nerdctl.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# nerdctl +# +################################################################################ + +NERDCTL_VERSION = 0.17.1 +NERDCTL_SITE = $(call github,containerd,nerdctl,v$(NERDCTL_VERSION)) + +NERDCTL_LICENSE = Apache-2.0 +NERDCTL_LICENSE_FILES = LICENSE + +NERDCTL_GOMOD = github.com/containerd/nerdctl + +NERDCTL_LDFLAGS = \ + -X $(NERDCTL_GOMOD)/pkg/version.Version=$(NERDCTL_VERSION) + +NERDCTL_BUILD_TARGETS = cmd/nerdctl + +$(eval $(golang-package))