From ea5a3d65a0ef53891a8113f7419b2a907f9d2e00 Mon Sep 17 00:00:00 2001 From: apostasie Date: Mon, 24 Jun 2024 17:21:14 -0700 Subject: [PATCH] Update to containerd v2 Signed-off-by: apostasie --- cmd/nerdctl/completion.go | 2 +- cmd/nerdctl/compose_images.go | 6 +- cmd/nerdctl/compose_ps.go | 6 +- cmd/nerdctl/compose_start.go | 4 +- cmd/nerdctl/compose_top.go | 2 +- cmd/nerdctl/container_attach.go | 2 +- cmd/nerdctl/container_diff.go | 6 +- cmd/nerdctl/container_exec.go | 2 +- cmd/nerdctl/container_kill.go | 2 +- cmd/nerdctl/container_pause.go | 2 +- .../container_run_cgroup_linux_test.go | 2 +- cmd/nerdctl/container_run_linux.go | 2 +- cmd/nerdctl/container_run_mount_linux_test.go | 2 +- .../container_run_network_linux_test.go | 2 +- cmd/nerdctl/container_run_test.go | 2 +- cmd/nerdctl/container_start.go | 2 +- cmd/nerdctl/container_stats.go | 2 +- cmd/nerdctl/container_stop.go | 2 +- cmd/nerdctl/container_top.go | 2 +- cmd/nerdctl/container_unpause.go | 2 +- cmd/nerdctl/container_update.go | 6 +- cmd/nerdctl/container_wait.go | 2 +- cmd/nerdctl/image_encrypt_linux_test.go | 4 +- cmd/nerdctl/image_history.go | 2 +- cmd/nerdctl/main_test.go | 4 +- cmd/nerdctl/namespace.go | 2 +- cmd/nerdctl/network_create.go | 2 +- go.mod | 130 ++++---- go.sum | 252 ++++++++------- pkg/apparmorutil/apparmorutil_linux.go | 4 +- pkg/bypass4netnsutil/bypass.go | 2 +- pkg/bypass4netnsutil/bypass4netnsutil.go | 4 +- pkg/cioutil/container_io.go | 6 +- pkg/cioutil/container_io_unix.go | 2 +- pkg/cioutil/container_io_windows.go | 2 +- pkg/clientutil/client.go | 9 +- pkg/cmd/apparmor/inspect_linux.go | 2 +- pkg/cmd/apparmor/load_linux.go | 2 +- pkg/cmd/builder/build.go | 8 +- pkg/cmd/compose/compose.go | 4 +- pkg/cmd/container/attach.go | 4 +- pkg/cmd/container/commit.go | 2 +- pkg/cmd/container/cp_linux.go | 2 +- pkg/cmd/container/create.go | 8 +- pkg/cmd/container/exec.go | 4 +- pkg/cmd/container/exec_linux.go | 2 +- pkg/cmd/container/inspect.go | 4 +- pkg/cmd/container/kill.go | 6 +- pkg/cmd/container/list.go | 8 +- pkg/cmd/container/list_util.go | 4 +- pkg/cmd/container/logs.go | 4 +- pkg/cmd/container/pause.go | 2 +- pkg/cmd/container/prune.go | 2 +- pkg/cmd/container/remove.go | 8 +- pkg/cmd/container/rename.go | 2 +- pkg/cmd/container/restart.go | 2 +- pkg/cmd/container/run_cgroup_freebsd.go | 2 +- pkg/cmd/container/run_cgroup_linux.go | 4 +- pkg/cmd/container/run_cgroup_windows.go | 2 +- pkg/cmd/container/run_freebsd.go | 6 +- pkg/cmd/container/run_gpus.go | 4 +- pkg/cmd/container/run_linux.go | 8 +- pkg/cmd/container/run_mount.go | 14 +- pkg/cmd/container/run_restart.go | 6 +- pkg/cmd/container/run_runtime.go | 13 +- pkg/cmd/container/run_security_linux.go | 8 +- pkg/cmd/container/run_ulimit.go | 4 +- pkg/cmd/container/run_user.go | 4 +- pkg/cmd/container/run_windows.go | 6 +- pkg/cmd/container/start.go | 2 +- pkg/cmd/container/stats.go | 6 +- pkg/cmd/container/stop.go | 4 +- pkg/cmd/container/top.go | 2 +- pkg/cmd/container/top_unix.go | 2 +- pkg/cmd/container/top_windows.go | 2 +- pkg/cmd/container/unpause.go | 2 +- pkg/cmd/container/wait.go | 2 +- pkg/cmd/image/convert.go | 67 ++-- pkg/cmd/image/crypt.go | 6 +- pkg/cmd/image/inspect.go | 4 +- pkg/cmd/image/list.go | 8 +- pkg/cmd/image/load.go | 8 +- pkg/cmd/image/prune.go | 4 +- pkg/cmd/image/pull.go | 2 +- pkg/cmd/image/push.go | 18 +- pkg/cmd/image/remove.go | 4 +- pkg/cmd/image/save.go | 4 +- pkg/cmd/image/tag.go | 4 +- pkg/cmd/login/login.go | 4 +- pkg/cmd/namespace/create.go | 2 +- pkg/cmd/namespace/inspect.go | 4 +- pkg/cmd/namespace/namespace_freebsd.go | 2 +- pkg/cmd/namespace/namespace_linux.go | 4 +- pkg/cmd/namespace/namespace_windows.go | 2 +- pkg/cmd/namespace/remove.go | 4 +- pkg/cmd/namespace/update.go | 2 +- pkg/cmd/network/create.go | 2 +- pkg/cmd/network/prune.go | 2 +- pkg/cmd/network/remove.go | 2 +- pkg/cmd/system/events.go | 4 +- pkg/cmd/system/info.go | 6 +- pkg/cmd/system/prune.go | 2 +- pkg/cmd/volume/create.go | 2 +- pkg/cmd/volume/list.go | 2 +- pkg/cmd/volume/prune.go | 2 +- pkg/cmd/volume/rm.go | 4 +- pkg/composer/composer.go | 4 +- pkg/composer/container.go | 2 +- pkg/composer/copy.go | 2 +- pkg/composer/exec.go | 2 +- pkg/composer/logs.go | 2 +- pkg/composer/orphans.go | 2 +- pkg/composer/pause.go | 2 +- pkg/composer/restart.go | 2 +- pkg/composer/rm.go | 2 +- pkg/composer/serviceparser/build.go | 4 +- pkg/composer/serviceparser/serviceparser.go | 4 +- pkg/composer/stop.go | 2 +- pkg/config/config.go | 7 +- pkg/containerdutil/content.go | 4 +- pkg/containerdutil/helpers.go | 2 +- pkg/containerdutil/snapshotter.go | 4 +- pkg/containerinspector/containerinspector.go | 4 +- pkg/containerutil/config.go | 4 +- .../container_network_manager.go | 6 +- .../container_network_manager_linux.go | 4 +- .../container_network_manager_other.go | 4 +- .../container_network_manager_windows.go | 6 +- pkg/containerutil/containerutil.go | 10 +- pkg/containerutil/cp_linux.go | 6 +- pkg/defaults/defaults_linux.go | 4 +- pkg/dnsutil/hostsstore/hostsstore.go | 2 +- pkg/dnsutil/hostsstore/updater.go | 2 +- pkg/eventutil/eventutil.go | 2 +- pkg/formatter/formatter.go | 8 +- pkg/idutil/containerwalker/containerwalker.go | 2 +- pkg/idutil/imagewalker/imagewalker.go | 4 +- pkg/imageinspector/imageinspector.go | 6 +- pkg/imgutil/commit/commit.go | 18 +- pkg/imgutil/converter/zstd.go | 12 +- .../dockerconfigresolver.go | 8 +- pkg/imgutil/filtering.go | 4 +- pkg/imgutil/imgutil.go | 10 +- pkg/imgutil/jobs/jobs.go | 8 +- pkg/imgutil/pull/pull.go | 6 +- pkg/imgutil/push/push.go | 10 +- pkg/imgutil/snapshotter.go | 14 +- pkg/imgutil/snapshotter_test.go | 4 +- pkg/infoutil/infoutil.go | 16 +- pkg/infoutil/infoutil_freebsd.go | 2 +- pkg/infoutil/infoutil_linux.go | 2 +- pkg/infoutil/infoutil_windows.go | 2 +- pkg/inspecttypes/dockercompat/dockercompat.go | 4 +- .../dockercompat/dockercompat_test.go | 4 +- pkg/inspecttypes/native/container.go | 4 +- pkg/inspecttypes/native/image.go | 2 +- pkg/ipcutil/ipcutil.go | 6 +- pkg/ipfs/image.go | 8 +- pkg/ipfs/registry.go | 4 +- pkg/logging/fluentd_logger.go | 2 +- pkg/logging/journald_logger.go | 2 +- pkg/logging/json_logger.go | 2 +- pkg/logging/logging.go | 4 +- pkg/logging/syslog_logger.go | 2 +- pkg/mountutil/mountutil.go | 8 +- pkg/mountutil/mountutil_freebsd.go | 4 +- pkg/mountutil/mountutil_linux.go | 6 +- pkg/mountutil/mountutil_linux_test.go | 4 +- pkg/mountutil/mountutil_windows.go | 4 +- pkg/mountutil/volumestore/volumestore.go | 4 +- pkg/namestore/namestore.go | 2 +- pkg/netutil/netutil.go | 6 +- pkg/ocihook/ocihook_linux.go | 2 +- pkg/platformutil/layers.go | 4 +- pkg/rootlessutil/child_linux.go | 2 +- pkg/rootlessutil/port_linux.go | 2 +- pkg/signalutil/signals.go | 4 +- pkg/strutil/strutil.go | 2 +- pkg/sysinfo/cgroup2_linux.go | 145 +++++++++ pkg/sysinfo/numcpu.go | 15 + pkg/sysinfo/numcpu_linux.go | 17 + pkg/sysinfo/numcpu_other.go | 8 + pkg/sysinfo/numcpu_windows.go | 36 +++ pkg/sysinfo/sysinfo.go | 170 ++++++++++ pkg/sysinfo/sysinfo_linux.go | 306 ++++++++++++++++++ pkg/sysinfo/sysinfo_linux_test.go | 123 +++++++ pkg/sysinfo/sysinfo_other.go | 8 + pkg/sysinfo/sysinfo_test.go | 26 ++ pkg/taskutil/taskutil.go | 4 +- pkg/testutil/nettestutil/nettestutil.go | 2 +- pkg/testutil/testutil.go | 2 +- 191 files changed, 1472 insertions(+), 576 deletions(-) create mode 100644 pkg/sysinfo/cgroup2_linux.go create mode 100644 pkg/sysinfo/numcpu.go create mode 100644 pkg/sysinfo/numcpu_linux.go create mode 100644 pkg/sysinfo/numcpu_other.go create mode 100644 pkg/sysinfo/numcpu_windows.go create mode 100644 pkg/sysinfo/sysinfo.go create mode 100644 pkg/sysinfo/sysinfo_linux.go create mode 100644 pkg/sysinfo/sysinfo_linux_test.go create mode 100644 pkg/sysinfo/sysinfo_other.go create mode 100644 pkg/sysinfo/sysinfo_test.go diff --git a/cmd/nerdctl/completion.go b/cmd/nerdctl/completion.go index ebd8d47c8bd..91845a8c744 100644 --- a/cmd/nerdctl/completion.go +++ b/cmd/nerdctl/completion.go @@ -20,7 +20,7 @@ import ( "context" "time" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/labels" "github.com/containerd/nerdctl/v2/pkg/netutil" diff --git a/cmd/nerdctl/compose_images.go b/cmd/nerdctl/compose_images.go index 80ef81855eb..8370e1a1fbf 100644 --- a/cmd/nerdctl/compose_images.go +++ b/cmd/nerdctl/compose_images.go @@ -22,9 +22,9 @@ import ( "strings" "text/tabwriter" - "github.com/containerd/containerd" - "github.com/containerd/containerd/pkg/progress" - "github.com/containerd/containerd/snapshots" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/snapshots" + "github.com/containerd/containerd/v2/pkg/progress" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/formatter" diff --git a/cmd/nerdctl/compose_ps.go b/cmd/nerdctl/compose_ps.go index 8d7d54e1b21..05f040be88a 100644 --- a/cmd/nerdctl/compose_ps.go +++ b/cmd/nerdctl/compose_ps.go @@ -23,9 +23,9 @@ import ( "text/tabwriter" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/runtime/restart" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/runtime/restart" + "github.com/containerd/errdefs" gocni "github.com/containerd/go-cni" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/clientutil" diff --git a/cmd/nerdctl/compose_start.go b/cmd/nerdctl/compose_start.go index 0268ab4569b..eeec4f2456d 100644 --- a/cmd/nerdctl/compose_start.go +++ b/cmd/nerdctl/compose_start.go @@ -21,8 +21,8 @@ import ( "fmt" "os" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/errdefs" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/containerutil" diff --git a/cmd/nerdctl/compose_top.go b/cmd/nerdctl/compose_top.go index 52ea6a71800..1a9c055e2d8 100644 --- a/cmd/nerdctl/compose_top.go +++ b/cmd/nerdctl/compose_top.go @@ -19,7 +19,7 @@ package main import ( "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" diff --git a/cmd/nerdctl/container_attach.go b/cmd/nerdctl/container_attach.go index 4c8067322ae..cc6fe7d58c9 100644 --- a/cmd/nerdctl/container_attach.go +++ b/cmd/nerdctl/container_attach.go @@ -17,7 +17,7 @@ package main import ( - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/cmd/nerdctl/container_diff.go b/cmd/nerdctl/container_diff.go index 7731327d3e2..7a3e3291b32 100644 --- a/cmd/nerdctl/container_diff.go +++ b/cmd/nerdctl/container_diff.go @@ -23,9 +23,9 @@ import ( "path/filepath" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/leases" - "github.com/containerd/containerd/mount" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/leases" + "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/continuity/fs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" diff --git a/cmd/nerdctl/container_exec.go b/cmd/nerdctl/container_exec.go index 751c3915190..c004b33147c 100644 --- a/cmd/nerdctl/container_exec.go +++ b/cmd/nerdctl/container_exec.go @@ -19,7 +19,7 @@ package main import ( "errors" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/cmd/nerdctl/container_kill.go b/cmd/nerdctl/container_kill.go index fe0e26ca501..4c859ab6775 100644 --- a/cmd/nerdctl/container_kill.go +++ b/cmd/nerdctl/container_kill.go @@ -17,7 +17,7 @@ package main import ( - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/cmd/nerdctl/container_pause.go b/cmd/nerdctl/container_pause.go index bf8cf4f0107..0938d80f305 100644 --- a/cmd/nerdctl/container_pause.go +++ b/cmd/nerdctl/container_pause.go @@ -17,7 +17,7 @@ package main import ( - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/cmd/nerdctl/container_run_cgroup_linux_test.go b/cmd/nerdctl/container_run_cgroup_linux_test.go index 8174336b8a3..6dad39f7eb4 100644 --- a/cmd/nerdctl/container_run_cgroup_linux_test.go +++ b/cmd/nerdctl/container_run_cgroup_linux_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/containerd/cgroups/v3" - "github.com/containerd/containerd/pkg/userns" + "github.com/containerd/containerd/v2/pkg/userns" "github.com/containerd/continuity/testutil/loopback" "github.com/containerd/nerdctl/v2/pkg/cmd/container" "github.com/containerd/nerdctl/v2/pkg/testutil" diff --git a/cmd/nerdctl/container_run_linux.go b/cmd/nerdctl/container_run_linux.go index 6ee1eeb2f9f..cdbfa19f8d9 100644 --- a/cmd/nerdctl/container_run_linux.go +++ b/cmd/nerdctl/container_run_linux.go @@ -19,7 +19,7 @@ package main import ( "strings" - "github.com/containerd/containerd/pkg/cap" + "github.com/containerd/containerd/v2/pkg/cap" "github.com/spf13/cobra" ) diff --git a/cmd/nerdctl/container_run_mount_linux_test.go b/cmd/nerdctl/container_run_mount_linux_test.go index ee8a8b6d14a..a497346d50c 100644 --- a/cmd/nerdctl/container_run_mount_linux_test.go +++ b/cmd/nerdctl/container_run_mount_linux_test.go @@ -23,7 +23,7 @@ import ( "strings" "testing" - "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" "github.com/containerd/nerdctl/v2/pkg/testutil" mobymount "github.com/moby/sys/mount" diff --git a/cmd/nerdctl/container_run_network_linux_test.go b/cmd/nerdctl/container_run_network_linux_test.go index 0f6f8990371..2e7c31ed104 100644 --- a/cmd/nerdctl/container_run_network_linux_test.go +++ b/cmd/nerdctl/container_run_network_linux_test.go @@ -25,7 +25,7 @@ import ( "strings" "testing" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" "github.com/containerd/nerdctl/v2/pkg/testutil" "github.com/containerd/nerdctl/v2/pkg/testutil/nettestutil" diff --git a/cmd/nerdctl/container_run_test.go b/cmd/nerdctl/container_run_test.go index fcf4305bcad..40b8a4c9a70 100644 --- a/cmd/nerdctl/container_run_test.go +++ b/cmd/nerdctl/container_run_test.go @@ -398,7 +398,7 @@ RUN echo '\ "path/filepath" \n\ "sync" \n\ \n\ - "github.com/containerd/containerd/runtime/v2/logging"\n\ + "github.com/containerd/containerd/v2/core/runtime/v2/logging"\n\ )\n\ func main() {\n\ diff --git a/cmd/nerdctl/container_start.go b/cmd/nerdctl/container_start.go index bd67d40f092..09fec22cc68 100644 --- a/cmd/nerdctl/container_start.go +++ b/cmd/nerdctl/container_start.go @@ -17,7 +17,7 @@ package main import ( - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/cmd/nerdctl/container_stats.go b/cmd/nerdctl/container_stats.go index f8281c12328..49ae7b90726 100644 --- a/cmd/nerdctl/container_stats.go +++ b/cmd/nerdctl/container_stats.go @@ -17,7 +17,7 @@ package main import ( - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/cmd/nerdctl/container_stop.go b/cmd/nerdctl/container_stop.go index 0398e36ae44..6fd886d4b32 100644 --- a/cmd/nerdctl/container_stop.go +++ b/cmd/nerdctl/container_stop.go @@ -19,7 +19,7 @@ package main import ( "time" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/cmd/nerdctl/container_top.go b/cmd/nerdctl/container_top.go index c51b23d7242..f26c9f7ae3c 100644 --- a/cmd/nerdctl/container_top.go +++ b/cmd/nerdctl/container_top.go @@ -20,7 +20,7 @@ import ( "errors" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/cmd/nerdctl/container_unpause.go b/cmd/nerdctl/container_unpause.go index 26909f790b2..753c49867ca 100644 --- a/cmd/nerdctl/container_unpause.go +++ b/cmd/nerdctl/container_unpause.go @@ -17,7 +17,7 @@ package main import ( - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/cmd/nerdctl/container_update.go b/cmd/nerdctl/container_update.go index 534ceb4961b..a90e5b93eef 100644 --- a/cmd/nerdctl/container_update.go +++ b/cmd/nerdctl/container_update.go @@ -23,9 +23,9 @@ import ( "fmt" "runtime" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" diff --git a/cmd/nerdctl/container_wait.go b/cmd/nerdctl/container_wait.go index 98156c44175..d5a132a53f8 100644 --- a/cmd/nerdctl/container_wait.go +++ b/cmd/nerdctl/container_wait.go @@ -17,7 +17,7 @@ package main import ( - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/cmd/nerdctl/image_encrypt_linux_test.go b/cmd/nerdctl/image_encrypt_linux_test.go index f6ba49ab5f1..e48e1769efb 100644 --- a/cmd/nerdctl/image_encrypt_linux_test.go +++ b/cmd/nerdctl/image_encrypt_linux_test.go @@ -24,8 +24,8 @@ import ( "path/filepath" "testing" - "github.com/containerd/containerd" - "github.com/containerd/containerd/content" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/content" "github.com/containerd/nerdctl/v2/pkg/buildkitutil" "github.com/containerd/nerdctl/v2/pkg/testutil" "github.com/containerd/nerdctl/v2/pkg/testutil/testregistry" diff --git a/cmd/nerdctl/image_history.go b/cmd/nerdctl/image_history.go index b420e53b447..0ac36dde3b5 100644 --- a/cmd/nerdctl/image_history.go +++ b/cmd/nerdctl/image_history.go @@ -28,7 +28,7 @@ import ( "text/template" "time" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/formatter" diff --git a/cmd/nerdctl/main_test.go b/cmd/nerdctl/main_test.go index 5310ad1cb72..b8400730133 100644 --- a/cmd/nerdctl/main_test.go +++ b/cmd/nerdctl/main_test.go @@ -21,7 +21,7 @@ import ( "path/filepath" "testing" - "github.com/containerd/containerd" + "github.com/containerd/containerd/v2/defaults" "github.com/containerd/nerdctl/v2/pkg/testutil" "gotest.tools/v3/assert" ) @@ -55,7 +55,7 @@ snapshotter = "dummy-snapshotter-via-toml" base := testutil.NewBase(t) // [Default] - base.Cmd("info", "-f", "{{.Driver}}").AssertOutExactly(containerd.DefaultSnapshotter + "\n") + base.Cmd("info", "-f", "{{.Driver}}").AssertOutExactly(defaults.DefaultSnapshotter + "\n") // [TOML, Default] base.Env = append(base.Env, "NERDCTL_TOML="+tomlPath) diff --git a/cmd/nerdctl/namespace.go b/cmd/nerdctl/namespace.go index b60e89ccd37..78847f0fd95 100644 --- a/cmd/nerdctl/namespace.go +++ b/cmd/nerdctl/namespace.go @@ -23,7 +23,7 @@ import ( "strings" "text/tabwriter" - "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/mountutil/volumestore" diff --git a/cmd/nerdctl/network_create.go b/cmd/nerdctl/network_create.go index c5fba0cac6b..ce1e2fba2a3 100644 --- a/cmd/nerdctl/network_create.go +++ b/cmd/nerdctl/network_create.go @@ -19,7 +19,7 @@ package main import ( "fmt" - "github.com/containerd/containerd/identifiers" + "github.com/containerd/containerd/v2/pkg/identifiers" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/network" "github.com/containerd/nerdctl/v2/pkg/strutil" diff --git a/go.mod b/go.mod index 3a1fae5d515..ef02a530e30 100644 --- a/go.mod +++ b/go.mod @@ -1,45 +1,69 @@ module github.com/containerd/nerdctl/v2 -go 1.21 +go 1.22.0 + +toolchain go1.22.3 + +// Pending https://github.com/data-accelerator/zdfs/pull/3 +// replace github.com/data-accelerator/zdfs => github.com/apostasie/zdfs v0.0.0-20240624193050-cb46fc0a8f42 + +// Pending https://github.com/containerd/accelerated-container-image/pull/290 +replace github.com/containerd/accelerated-container-image => github.com/apostasie/accelerated-container-image v0.0.0-20240704080227-5604261b623c + +// Pending https://github.com/containerd/stargz-snapshotter/pull/1722 +replace github.com/containerd/stargz-snapshotter => github.com/apostasie/stargz-snapshotter v0.0.0-20240624071742-7014809d9d17 + +replace github.com/containerd/stargz-snapshotter/ipfs => github.com/apostasie/stargz-snapshotter/ipfs v0.0.0-20240624071742-7014809d9d17 + +replace github.com/containerd/stargz-snapshotter/estargz => github.com/apostasie/stargz-snapshotter/estargz v0.0.0-20240624071742-7014809d9d17 + +// Pending https://github.com/microsoft/hcsshim/pull/1958 +replace github.com/Microsoft/hcsshim => github.com/apostasie/hcsshim v0.0.0-20240704071230-9cb483cef404 + +// Pending moby updating to containerd v2 - no current PR AFAIK +// replace github.com/docker/docker/pkg/sysinfo => ./pkg2/sysinfo require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/Microsoft/go-winio v0.6.2 github.com/Microsoft/hcsshim v0.12.4 - github.com/awslabs/soci-snapshotter v0.6.1 github.com/compose-spec/compose-go/v2 v2.1.3 - github.com/containerd/accelerated-container-image v1.1.3 + github.com/containerd/accelerated-container-image v0.0.0-00010101000000-000000000000 + github.com/containerd/cgroups v1.1.0 github.com/containerd/cgroups/v3 v3.0.3 github.com/containerd/console v1.0.4 - github.com/containerd/containerd v1.7.19 - github.com/containerd/containerd/api v1.7.19 + github.com/containerd/containerd/api v1.8.0-rc.2 + github.com/containerd/containerd/v2 v2.0.0-rc.3 github.com/containerd/continuity v0.4.3 + github.com/containerd/errdefs v0.1.0 github.com/containerd/fifo v1.1.0 - github.com/containerd/go-cni v1.1.10 - github.com/containerd/imgcrypt v1.1.11 + github.com/containerd/go-cni v1.1.9 + github.com/containerd/imgcrypt v1.1.12-0.20240528203804-3ca09a2db5cd github.com/containerd/log v0.1.0 - github.com/containerd/nydus-snapshotter v0.13.13 github.com/containerd/platforms v0.2.1 - github.com/containerd/stargz-snapshotter v0.15.1 + github.com/containerd/stargz-snapshotter v0.0.0-00010101000000-000000000000 github.com/containerd/stargz-snapshotter/estargz v0.15.1 - github.com/containerd/stargz-snapshotter/ipfs v0.15.1 + github.com/containerd/stargz-snapshotter/ipfs v0.0.0-00010101000000-000000000000 github.com/containerd/typeurl/v2 v2.1.1 - github.com/containernetworking/cni v1.2.2 - github.com/containernetworking/plugins v1.5.1 + github.com/containernetworking/cni v1.2.0 + github.com/containernetworking/plugins v1.4.1 github.com/coreos/go-iptables v0.7.0 github.com/coreos/go-systemd/v22 v22.5.0 github.com/cyphar/filepath-securejoin v0.2.5 + github.com/distribution/reference v0.6.0 github.com/docker/cli v27.0.3+incompatible github.com/docker/docker v27.0.3+incompatible - github.com/docker/go-connections v0.5.0 + github.com/docker/go-connections v0.4.0 github.com/docker/go-units v0.5.0 github.com/fahedouch/go-logrotate v0.2.1 - github.com/fatih/color v1.17.0 + github.com/fatih/color v1.15.0 github.com/fluent/fluent-logger-golang v1.9.0 - github.com/ipfs/go-cid v0.4.1 - github.com/mattn/go-isatty v0.0.20 + github.com/ipfs/go-cid v0.0.7 + github.com/klauspost/compress v1.17.9 + github.com/mattn/go-isatty v0.0.17 github.com/mitchellh/mapstructure v1.5.0 github.com/moby/sys/mount v0.3.3 + github.com/moby/sys/mountinfo v0.7.1 github.com/moby/sys/signal v0.7.0 github.com/moby/term v0.5.0 github.com/muesli/cancelreader v0.2.2 @@ -56,48 +80,41 @@ require ( github.com/vishvananda/netns v0.0.4 github.com/yuchanns/srslog v1.1.0 go.uber.org/mock v0.4.0 - golang.org/x/crypto v0.24.0 - golang.org/x/net v0.26.0 + golang.org/x/crypto v0.23.0 + golang.org/x/net v0.25.0 golang.org/x/sync v0.7.0 golang.org/x/sys v0.21.0 - golang.org/x/term v0.21.0 - golang.org/x/text v0.16.0 + golang.org/x/term v0.20.0 + golang.org/x/text v0.15.0 gopkg.in/yaml.v3 v3.0.1 gotest.tools/v3 v3.5.1 ) -require github.com/go-viper/mapstructure/v2 v2.0.0 // indirect - require ( github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/cilium/ebpf v0.11.0 // indirect - github.com/containerd/errdefs v0.1.0 // indirect - github.com/containerd/go-runc v1.0.0 // indirect - github.com/containerd/ttrpc v1.2.5 // indirect - github.com/containerd/typeurl v1.0.3-0.20220422153119-7f6e6d160d67 // indirect + github.com/containerd/go-runc v1.1.0 // indirect + github.com/containerd/plugin v0.1.0 // indirect + github.com/containerd/ttrpc v1.2.4 // indirect github.com/containers/ocicrypt v1.1.10 // indirect - github.com/distribution/reference v0.6.0 github.com/djherbis/times v1.6.0 // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect - github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-jose/go-jose/v3 v3.0.3 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/klauspost/compress v1.17.9 - github.com/klauspost/cpuid/v2 v2.2.3 // indirect + github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/miekg/pkcs11 v1.1.1 // indirect @@ -105,41 +122,44 @@ require ( github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/locker v1.0.1 // indirect - github.com/moby/sys/mountinfo v0.7.1 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/sys/symlink v0.2.0 // indirect github.com/moby/sys/user v0.1.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect - github.com/multiformats/go-base36 v0.1.0 // indirect - github.com/multiformats/go-multiaddr v0.12.0 // indirect - github.com/multiformats/go-multibase v0.1.1 // indirect - github.com/multiformats/go-multihash v0.2.1 // indirect - github.com/multiformats/go-varint v0.0.6 // indirect + github.com/multiformats/go-base36 v0.2.0 // indirect + github.com/multiformats/go-multiaddr v0.12.4 // indirect + github.com/multiformats/go-multibase v0.2.0 // indirect + github.com/multiformats/go-multihash v0.2.3 // indirect + github.com/multiformats/go-varint v0.0.7 // indirect + github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 // indirect github.com/opencontainers/selinux v1.11.0 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/philhofer/fwd v1.1.1 // indirect + github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 // indirect + github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 // indirect + github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/tinylib/msgp v1.1.6 // indirect + github.com/tinylib/msgp v1.2.0 // indirect github.com/vbatts/tar-split v0.11.5 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect - google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect - lukechampine.com/blake3 v1.1.7 // indirect + golang.org/x/mod v0.18.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + lukechampine.com/blake3 v1.2.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect + tags.cncf.io/container-device-interface v0.7.2 // indirect + tags.cncf.io/container-device-interface/specs-go v0.7.0 // indirect ) diff --git a/go.sum b/go.sum index 1f82deb2ae6..9cefa3d2588 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9 github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 h1:59MxjQVfjXsBpLy+dbd2/ELV5ofnUkUZBvWSC85sheA= github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= @@ -12,10 +12,18 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0 github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/Microsoft/hcsshim v0.12.4 h1:Ev7YUMHAHoWNm+aDSPzc5W9s6E2jyL1szpVDJeZ/Rr4= -github.com/Microsoft/hcsshim v0.12.4/go.mod h1:Iyl1WVpZzr+UkzjekHZbV8o5Z9ZkxNGx6CtY2Qg/JVQ= -github.com/awslabs/soci-snapshotter v0.6.1 h1:ggiuiCPReSNvfUL084Ujyp0glRNiCsZiaCh2rE580HA= -github.com/awslabs/soci-snapshotter v0.6.1/go.mod h1:o9NuuMmvmcpc+jRSoJlQqSqrWCjMO1x67C65wmCme7E= +github.com/apostasie/accelerated-container-image v0.0.0-20240704080227-5604261b623c h1:YrYbfyNtN7l+xuyNtwfFL1h1mJWxDkywzdt9WyOGXtg= +github.com/apostasie/accelerated-container-image v0.0.0-20240704080227-5604261b623c/go.mod h1:jAta9JfIJhhPnrNzG4ZqMmx665pMOnTFf9OxJCay16M= +github.com/apostasie/hcsshim v0.0.0-20240704071230-9cb483cef404 h1:6VhO6cRgKTFjVJMn9f36ZJq0h5TgtMftZukXmiG6fnQ= +github.com/apostasie/hcsshim v0.0.0-20240704071230-9cb483cef404/go.mod h1:PvNnf1ah3lkWq3iBM6Wes2qwg0AjmdvJyGWlVSDzIGE= +github.com/apostasie/stargz-snapshotter v0.0.0-20240624071742-7014809d9d17 h1:I8or/QOClBZqHhxX+Jng2NXZvmDTX5HWy3rjb2Oggg8= +github.com/apostasie/stargz-snapshotter v0.0.0-20240624071742-7014809d9d17/go.mod h1:dgo5lVziOOnWX8SxxHqYuc8ShsQou54eKLdahxFlHVc= +github.com/apostasie/stargz-snapshotter/estargz v0.0.0-20240624071742-7014809d9d17 h1:yPXXolScAXakuMEwPCs8EToa7tm7/AyQnHIsJvtih1E= +github.com/apostasie/stargz-snapshotter/estargz v0.0.0-20240624071742-7014809d9d17/go.mod h1:9WSor0wu2swhtYoFkrjy3GHt7aNgKR2A7FhnpP+CH5o= +github.com/apostasie/stargz-snapshotter/ipfs v0.0.0-20240624071742-7014809d9d17 h1:EnKQJIF3grFeuL9GYeLBP/y7GkJ2GQFSuQ0npIL91Hc= +github.com/apostasie/stargz-snapshotter/ipfs v0.0.0-20240624071742-7014809d9d17/go.mod h1:L/J/O36DzcGxq3drHM45sJRr/pEQTG5u+tbffVhP6r8= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -25,51 +33,42 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/compose-spec/compose-go/v2 v2.1.3 h1:bD67uqLuL/XgkAK6ir3xZvNLFPxPScEi1KW7R5esrLE= github.com/compose-spec/compose-go/v2 v2.1.3/go.mod h1:lFN0DrMxIncJGYAXTfWuajfwj5haBJqrBkarHcnjJKc= -github.com/containerd/accelerated-container-image v1.1.3 h1:4fw0FsGB3YPHzth8H8WalJxnVuUU566+UCTXnoIZRCQ= -github.com/containerd/accelerated-container-image v1.1.3/go.mod h1:9mpTpL4W4yAsq2giHgo4B7wTFJgE59qCPh7dZTSpGCA= +github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= +github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= -github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro= github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= -github.com/containerd/containerd v1.7.19 h1:/xQ4XRJ0tamDkdzrrBAUy/LE5nCcxFKdBm4EcPrSMEE= -github.com/containerd/containerd v1.7.19/go.mod h1:h4FtNYUUMB4Phr6v+xG89RYKj9XccvbNSCKjdufCrkc= -github.com/containerd/containerd/api v1.7.19 h1:VWbJL+8Ap4Ju2mx9c9qS1uFSB1OVYr5JJrW2yT5vFoA= -github.com/containerd/containerd/api v1.7.19/go.mod h1:fwGavl3LNwAV5ilJ0sbrABL44AQxmNjDRcwheXDb6Ig= +github.com/containerd/containerd/api v1.8.0-rc.2 h1:EnWLDKWWbIRzuy71L20P3VF/DhxSaDEocsovKPdW5Oo= +github.com/containerd/containerd/api v1.8.0-rc.2/go.mod h1:VgMSK19YOLolP4a1/b5vlVkTo8MzMoLPZnvD1PNWeGg= +github.com/containerd/containerd/v2 v2.0.0-rc.3 h1:rRISeKYnunLx8Byw8FQ/a62mTMtcr6ESGptS4+MwLaQ= +github.com/containerd/containerd/v2 v2.0.0-rc.3/go.mod h1:UBHR1DgWRQcEOINFkR94m0VC0MgKd3qg9LVPnudv9vs= github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= -github.com/containerd/go-cni v1.1.10 h1:c2U73nld7spSWfiJwSh/8W9DK+/qQwYM2rngIhCyhyg= -github.com/containerd/go-cni v1.1.10/go.mod h1:/Y/sL8yqYQn1ZG1om1OncJB1W4zN3YmjfP/ShCzG/OY= -github.com/containerd/go-runc v1.0.0 h1:oU+lLv1ULm5taqgV/CJivypVODI4SUz1znWjv3nNYS0= -github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/imgcrypt v1.1.11 h1:3RULIeLouE7B5l9NzMq0HdPWG0DP5deEVxB5UKxyUoU= -github.com/containerd/imgcrypt v1.1.11/go.mod h1:nXL4jp1GrtO758b16DVsxaHHzu9PravAsKARYmyHR58= +github.com/containerd/go-cni v1.1.9 h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9rU= +github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM= +github.com/containerd/go-runc v1.1.0 h1:OX4f+/i2y5sUT7LhmcJH7GYrjjhHa1QI4e8yO0gGleA= +github.com/containerd/go-runc v1.1.0/go.mod h1:xJv2hFF7GvHtTJd9JqTS2UVxMkULUYw4JN5XAUZqH5U= +github.com/containerd/imgcrypt v1.1.12-0.20240528203804-3ca09a2db5cd h1:GjAKQysk1gNYupyhuvCyNvNRNtmPF7e8/+OhqT/8zu4= +github.com/containerd/imgcrypt v1.1.12-0.20240528203804-3ca09a2db5cd/go.mod h1:HwgRdLSki2P6QOWbrqnK9vBs5Ew9WNjY1nPTB/xA9w0= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/containerd/nydus-snapshotter v0.13.13 h1:4eCKSNjmozLQ038G2a3X8DEwmrsHsRPMdVGX+zjcaTc= -github.com/containerd/nydus-snapshotter v0.13.13/go.mod h1:VPVKQ3jmHFIcUIV2yiQ1kImZuBFS3GXDohKs9mRABVE= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= -github.com/containerd/stargz-snapshotter v0.15.1 h1:fpsP4kf/Z4n2EYnU0WT8ZCE3eiKDwikDhL6VwxIlgeA= -github.com/containerd/stargz-snapshotter v0.15.1/go.mod h1:74D+J1m1RMXytLmWxegXWhtOSRHPWZKpKc2NdK3S+us= -github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU= -github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= -github.com/containerd/stargz-snapshotter/ipfs v0.15.1 h1:MMWRYrTu2iVOn9eRJqEer7v0eg34xY2uFZxbrrm2iCY= -github.com/containerd/stargz-snapshotter/ipfs v0.15.1/go.mod h1:DvrczCWAJnbTOau8txguZXDZdA7r39O3/Aj2olx+Q90= -github.com/containerd/ttrpc v1.2.5 h1:IFckT1EFQoFBMG4c3sMdT8EP3/aKfumK1msY+Ze4oLU= -github.com/containerd/ttrpc v1.2.5/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= -github.com/containerd/typeurl v1.0.3-0.20220422153119-7f6e6d160d67 h1:rQvjv7gRi6Ki/NS/U9oLZFhqyk4dh/GH2M3o/4BRkMM= -github.com/containerd/typeurl v1.0.3-0.20220422153119-7f6e6d160d67/go.mod h1:HDkcKOXRnX6yKnXv3P0QrogFi0DoiauK/LpQi961f0A= +github.com/containerd/plugin v0.1.0 h1:CYMyZk9beRAIe1FEKItbMLLAz/z16aXrGc+B+nv0fU4= +github.com/containerd/plugin v0.1.0/go.mod h1:j6HlpMtkiZMgT4UsfVNxPBUkwdw9KQGU6nCLfRxnq+w= +github.com/containerd/ttrpc v1.2.4 h1:eQCQK4h9dxDmpOb9QOOMh2NHTfzroH1IkmHiKZi05Oo= +github.com/containerd/ttrpc v1.2.4/go.mod h1:ojvb8SJBSch0XkqNO0L0YX/5NxR3UnVk2LzFKBK0upc= github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= -github.com/containernetworking/cni v1.2.2 h1:9IbP6KJQQxVKo4hhnm8r50YcVKrJbJu3Dqw+Rbt1vYk= -github.com/containernetworking/cni v1.2.2/go.mod h1:DuLgF+aPd3DzcTQTtp/Nvl1Kim23oFKdm2okJzBQA5M= -github.com/containernetworking/plugins v1.5.1 h1:T5ji+LPYjjgW0QM+KyrigZbLsZ8jaX+E5J/EcKOE4gQ= -github.com/containernetworking/plugins v1.5.1/go.mod h1:MIQfgMayGuHYs0XdNudf31cLLAC+i242hNm6KuDGqCM= +github.com/containernetworking/cni v1.2.0 h1:fEjhlfWwWAXEvlcMQu/i6z8DA0Kbu7EcmR5+zb6cm5I= +github.com/containernetworking/cni v1.2.0/go.mod h1:/r+vA/7vrynNfbvSP9g8tIKEoy6win7sALJAw4ZiJks= +github.com/containernetworking/plugins v1.4.1 h1:+sJRRv8PKhLkXIl6tH1D7RMi+CbbHutDGU+ErLBORWA= +github.com/containernetworking/plugins v1.4.1/go.mod h1:n6FFGKcaY4o2o5msgu/UImtoC+fpQXM3076VHfHbj60= github.com/containers/ocicrypt v1.1.10 h1:r7UR6o8+lyhkEywetubUUgcKFjOWOaWz8cEBrCPX0ic= github.com/containers/ocicrypt v1.1.10/go.mod h1:YfzSSr06PTHQwSTUKqDSjish9BeW1E4HUmreluQcMd8= github.com/coreos/go-iptables v0.7.0 h1:XWM3V+MPRr5/q51NuWSgU0fqMad64Zyxs8ZUoMsamr8= @@ -82,8 +81,9 @@ github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/djherbis/times v1.6.0 h1:w2ctJ92J8fBvWPxugmXIv7Nz7Q3iDMKNx9v5ocVH20c= @@ -94,10 +94,8 @@ github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwX github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= -github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -106,23 +104,25 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fahedouch/go-logrotate v0.2.1 h1:Q0Hk9Kp/Y4iwy9uR9e/60fEoxGhvfk8MG7WwtL9aarM= github.com/fahedouch/go-logrotate v0.2.1/go.mod h1:Mmyex1f9fGXBNnhS9uHsbnO9BGvADF4VGqVnqAJalgc= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fluent/fluent-logger-golang v1.9.0 h1:zUdY44CHX2oIUc7VTNZc+4m+ORuO/mldQDA7czhWXEg= github.com/fluent/fluent-logger-golang v1.9.0/go.mod h1:2/HCT/jTy78yGyeNGQLGQsjF3zzzAuy6Xlk6FCMV5eU= github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA= github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k= github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= -github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -157,11 +157,10 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20230323073829-e72429f035bd h1:r8yyd+DJDmsUhGrRBxH5Pj7KeFK5l+Y3FsgT8keqKtk= +github.com/google/pprof v0.0.0-20230323073829-e72429f035bd/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -169,15 +168,14 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= -github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= +github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY= +github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU= -github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= +github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -185,18 +183,21 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b/go.mod h1:pzzDgJWZ34fGzaAZGFW22KVZDfyrYW+QABMrWnJBnSs= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= @@ -216,56 +217,66 @@ github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= +github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= +github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= -github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= -github.com/multiformats/go-multiaddr v0.12.0 h1:1QlibTFkoXJuDjjYsMHhE73TnzJQl8FSWatk/0gxGzE= -github.com/multiformats/go-multiaddr v0.12.0/go.mod h1:WmZXgObOQOYp9r3cslLlppkrz1FYSHmE834dfz/lWu8= -github.com/multiformats/go-multibase v0.1.1 h1:3ASCDsuLX8+j4kx58qnJ4YFq/JWTJpCyDW27ztsVTOI= -github.com/multiformats/go-multibase v0.1.1/go.mod h1:ZEjHE+IsUrgp5mhlEAYjMtZwK1k4haNkcaPg9aoe1a8= -github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= -github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= -github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= -github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= +github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= +github.com/multiformats/go-multiaddr v0.12.4 h1:rrKqpY9h+n80EwhhC/kkcunCZZ7URIF8yN1WEUt2Hvc= +github.com/multiformats/go-multiaddr v0.12.4/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII= +github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= +github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= +github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= +github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= +github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= +github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= +github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= +github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= +github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= +github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= +github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20220825212826-86290f6a00fb/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 h1:DmNGcqH3WDbV5k8OJ+esPWbqUOX5rMLR2PMvziDMJi0= +github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626/go.mod h1:BRHJJd0E+cx42OybVYSgUvZmU0B8P9gZuRXlZUP7TKI= +github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= -github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 h1:jYi87L8j62qkXzaYHAQAhEapgukhenIMZRBKTNRLHJ4= +github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rootless-containers/bypass4netns v0.4.1 h1:zyYM1uSG7/prAphD2vlJvx/MEKK91EjD2XaefGx5PKA= github.com/rootless-containers/bypass4netns v0.4.1/go.mod h1:slu3ygwy1x6ey78oBTNs7lpymyEimLBYoXOG76b+Q+Y= github.com/rootless-containers/rootlesskit/v2 v2.1.0 h1:dKqduSlzo5TlTv7tTIoTct2cRUNQf+soqcs+6b1ynvE= github.com/rootless-containers/rootlesskit/v2 v2.1.0/go.mod h1:W+5NaXv3l2sD4LiPxRWLOlY+p9H0+Ev71zel/zFRnLo= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= @@ -274,8 +285,8 @@ github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 h1:pnnLyeX7o/5aX8qUQ69P/mLojDqwda8hFOCBTmP/6hw= -github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6/go.mod h1:39R/xuhNgVhi+K0/zst4TLrJrVmbm6LVgl4A0+ZFS5M= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -290,14 +301,17 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tinylib/msgp v1.1.6 h1:i+SbKraHhnrf9M5MYmvQhFnbLhAXSDWF8WWsuyRdocw= -github.com/tinylib/msgp v1.1.6/go.mod h1:75BAfg2hauQhs3qedfdDZmWAPcFMAvJE5b9rGOMufyw= +github.com/tinylib/msgp v1.2.0 h1:0uKB/662twsVBpYUPbokj4sTSKhWFKB7LopO2kWK8lY= +github.com/tinylib/msgp v1.2.0/go.mod h1:2vIGs3lcUo8izAATNobrCHevYZC/LMsJtw4JPiYPHro= +github.com/urfave/cli v1.19.1/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs= @@ -321,25 +335,26 @@ go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwf go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= @@ -350,6 +365,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -363,8 +380,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -379,9 +396,9 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -389,13 +406,11 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= @@ -405,16 +420,16 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -422,12 +437,11 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -437,17 +451,15 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be h1:LG9vZxsWGOmUKieR8wPAUR3u3MpnYFQZROPIMaXh7/A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -459,8 +471,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -472,5 +484,11 @@ gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= -lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= +lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= +lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +tags.cncf.io/container-device-interface v0.7.2 h1:MLqGnWfOr1wB7m08ieI4YJ3IoLKKozEnnNYBtacDPQU= +tags.cncf.io/container-device-interface v0.7.2/go.mod h1:Xb1PvXv2BhfNb3tla4r9JL129ck1Lxv9KuU6eVOfKto= +tags.cncf.io/container-device-interface/specs-go v0.7.0 h1:w/maMGVeLP6TIQJVYT5pbqTi8SCw/iHZ+n4ignuGHqg= +tags.cncf.io/container-device-interface/specs-go v0.7.0/go.mod h1:hMAwAbMZyBLdmYqWgYcKH0F/yctNpV3P35f+/088A80= diff --git a/pkg/apparmorutil/apparmorutil_linux.go b/pkg/apparmorutil/apparmorutil_linux.go index 38ea38c7f2d..aea0d321b47 100644 --- a/pkg/apparmorutil/apparmorutil_linux.go +++ b/pkg/apparmorutil/apparmorutil_linux.go @@ -23,8 +23,8 @@ import ( "strings" "sync" - "github.com/containerd/containerd/pkg/apparmor" - "github.com/containerd/containerd/pkg/userns" + "github.com/containerd/containerd/v2/pkg/apparmor" + "github.com/containerd/containerd/v2/pkg/userns" "github.com/containerd/log" ) diff --git a/pkg/bypass4netnsutil/bypass.go b/pkg/bypass4netnsutil/bypass.go index 9e69952b70d..2008d457f80 100644 --- a/pkg/bypass4netnsutil/bypass.go +++ b/pkg/bypass4netnsutil/bypass.go @@ -23,7 +23,7 @@ import ( "net" "path/filepath" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" gocni "github.com/containerd/go-cni" "github.com/containerd/nerdctl/v2/pkg/annotations" b4nnapi "github.com/rootless-containers/bypass4netns/pkg/api" diff --git a/pkg/bypass4netnsutil/bypass4netnsutil.go b/pkg/bypass4netnsutil/bypass4netnsutil.go index 6ba7c383a79..0d67e2c0546 100644 --- a/pkg/bypass4netnsutil/bypass4netnsutil.go +++ b/pkg/bypass4netnsutil/bypass4netnsutil.go @@ -23,8 +23,8 @@ import ( "path/filepath" "strconv" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/annotations" "github.com/opencontainers/runtime-spec/specs-go" b4nnoci "github.com/rootless-containers/bypass4netns/pkg/oci" diff --git a/pkg/cioutil/container_io.go b/pkg/cioutil/container_io.go index 24fb89186ba..1b0b1a01bfb 100644 --- a/pkg/cioutil/container_io.go +++ b/pkg/cioutil/container_io.go @@ -29,9 +29,9 @@ import ( "syscall" "time" - "github.com/containerd/containerd/cio" - "github.com/containerd/containerd/defaults" - "github.com/containerd/containerd/pkg/process" + "github.com/containerd/containerd/v2/cmd/containerd-shim-runc-v2/process" + "github.com/containerd/containerd/v2/defaults" + "github.com/containerd/containerd/v2/pkg/cio" ) const binaryIOProcTermTimeout = 12 * time.Second // Give logger process 10 seconds for cleanup diff --git a/pkg/cioutil/container_io_unix.go b/pkg/cioutil/container_io_unix.go index 1749a018c98..c9d23110940 100644 --- a/pkg/cioutil/container_io_unix.go +++ b/pkg/cioutil/container_io_unix.go @@ -26,7 +26,7 @@ import ( "sync" "syscall" - "github.com/containerd/containerd/cio" + "github.com/containerd/containerd/v2/pkg/cio" "github.com/containerd/fifo" ) diff --git a/pkg/cioutil/container_io_windows.go b/pkg/cioutil/container_io_windows.go index 6dde42f12a6..97e521b2c7f 100644 --- a/pkg/cioutil/container_io_windows.go +++ b/pkg/cioutil/container_io_windows.go @@ -22,7 +22,7 @@ import ( "os/exec" "github.com/Microsoft/go-winio" - "github.com/containerd/containerd/cio" + "github.com/containerd/containerd/v2/pkg/cio" "github.com/containerd/log" ) diff --git a/pkg/clientutil/client.go b/pkg/clientutil/client.go index 03a6105247b..2e4043eb6f0 100644 --- a/pkg/clientutil/client.go +++ b/pkg/clientutil/client.go @@ -24,8 +24,8 @@ import ( "runtime" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/namespaces" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/platformutil" "github.com/containerd/nerdctl/v2/pkg/systemutil" @@ -33,8 +33,7 @@ import ( "github.com/opencontainers/go-digest" ) -func NewClient(ctx context.Context, namespace, address string, opts ...containerd.ClientOpt) (*containerd.Client, context.Context, context.CancelFunc, error) { - +func NewClient(ctx context.Context, namespace, address string, opts ...containerd.Opt) (*containerd.Client, context.Context, context.CancelFunc, error) { ctx = namespaces.WithNamespace(ctx, namespace) address = strings.TrimPrefix(address, "unix://") @@ -56,7 +55,7 @@ func NewClient(ctx context.Context, namespace, address string, opts ...container return client, ctx, cancel, nil } -func NewClientWithPlatform(ctx context.Context, namespace, address, platform string, clientOpts ...containerd.ClientOpt) (*containerd.Client, context.Context, context.CancelFunc, error) { +func NewClientWithPlatform(ctx context.Context, namespace, address, platform string, clientOpts ...containerd.Opt) (*containerd.Client, context.Context, context.CancelFunc, error) { if platform != "" { if canExec, canExecErr := platformutil.CanExecProbably(platform); !canExec { warn := fmt.Sprintf("Platform %q seems incompatible with the host platform %q. If you see \"exec format error\", see https://github.com/containerd/nerdctl/blob/main/docs/multi-platform.md", diff --git a/pkg/cmd/apparmor/inspect_linux.go b/pkg/cmd/apparmor/inspect_linux.go index e24dc1f0a27..53e2652be4d 100644 --- a/pkg/cmd/apparmor/inspect_linux.go +++ b/pkg/cmd/apparmor/inspect_linux.go @@ -19,7 +19,7 @@ package apparmor import ( "fmt" - "github.com/containerd/containerd/contrib/apparmor" + "github.com/containerd/containerd/v2/contrib/apparmor" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/defaults" ) diff --git a/pkg/cmd/apparmor/load_linux.go b/pkg/cmd/apparmor/load_linux.go index aace881f288..73bf9f93d98 100644 --- a/pkg/cmd/apparmor/load_linux.go +++ b/pkg/cmd/apparmor/load_linux.go @@ -17,7 +17,7 @@ package apparmor import ( - "github.com/containerd/containerd/contrib/apparmor" + "github.com/containerd/containerd/v2/contrib/apparmor" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/defaults" ) diff --git a/pkg/cmd/builder/build.go b/pkg/cmd/builder/build.go index 0e9e39fbc53..449b5f2b998 100644 --- a/pkg/cmd/builder/build.go +++ b/pkg/cmd/builder/build.go @@ -28,10 +28,10 @@ import ( "strconv" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/images/archive" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/images/archive" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/buildkitutil" diff --git a/pkg/cmd/compose/compose.go b/pkg/cmd/compose/compose.go index b0ea6ac3ca9..b4a00d268ac 100644 --- a/pkg/cmd/compose/compose.go +++ b/pkg/cmd/compose/compose.go @@ -23,8 +23,8 @@ import ( "os" "path/filepath" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/errdefs" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/volume" "github.com/containerd/nerdctl/v2/pkg/composer" diff --git a/pkg/cmd/container/attach.go b/pkg/cmd/container/attach.go index c7fda751628..31b480770f9 100644 --- a/pkg/cmd/container/attach.go +++ b/pkg/cmd/container/attach.go @@ -22,8 +22,8 @@ import ( "fmt" "github.com/containerd/console" - "github.com/containerd/containerd" - "github.com/containerd/containerd/cio" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/cio" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/consoleutil" diff --git a/pkg/cmd/container/commit.go b/pkg/cmd/container/commit.go index 4a6a98bc110..1814b926ebe 100644 --- a/pkg/cmd/container/commit.go +++ b/pkg/cmd/container/commit.go @@ -22,7 +22,7 @@ import ( "fmt" "strings" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" diff --git a/pkg/cmd/container/cp_linux.go b/pkg/cmd/container/cp_linux.go index 79466203894..19b8a69c8da 100644 --- a/pkg/cmd/container/cp_linux.go +++ b/pkg/cmd/container/cp_linux.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerutil" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" diff --git a/pkg/cmd/container/create.go b/pkg/cmd/container/create.go index 2b347d890e1..fcce95d464d 100644 --- a/pkg/cmd/container/create.go +++ b/pkg/cmd/container/create.go @@ -29,10 +29,10 @@ import ( "strconv" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/cio" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/pkg/cio" + "github.com/containerd/containerd/v2/pkg/oci" gocni "github.com/containerd/go-cni" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/annotations" diff --git a/pkg/cmd/container/exec.go b/pkg/cmd/container/exec.go index 8beefcf1091..6fce2849d04 100644 --- a/pkg/cmd/container/exec.go +++ b/pkg/cmd/container/exec.go @@ -23,8 +23,8 @@ import ( "os" "github.com/containerd/console" - "github.com/containerd/containerd" - "github.com/containerd/containerd/cio" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/cio" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/consoleutil" diff --git a/pkg/cmd/container/exec_linux.go b/pkg/cmd/container/exec_linux.go index 28fb7c09028..cd3997020b0 100644 --- a/pkg/cmd/container/exec_linux.go +++ b/pkg/cmd/container/exec_linux.go @@ -17,7 +17,7 @@ package container import ( - "github.com/containerd/containerd/pkg/cap" + "github.com/containerd/containerd/v2/pkg/cap" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/pkg/cmd/container/inspect.go b/pkg/cmd/container/inspect.go index 564159e2a74..2e2c399c221 100644 --- a/pkg/cmd/container/inspect.go +++ b/pkg/cmd/container/inspect.go @@ -21,8 +21,8 @@ import ( "fmt" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/snapshots" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerdutil" diff --git a/pkg/cmd/container/kill.go b/pkg/cmd/container/kill.go index d185ff09be3..661e465d6c8 100644 --- a/pkg/cmd/container/kill.go +++ b/pkg/cmd/container/kill.go @@ -24,9 +24,9 @@ import ( "strings" "syscall" - "github.com/containerd/containerd" - "github.com/containerd/containerd/cio" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/cio" + "github.com/containerd/errdefs" gocni "github.com/containerd/go-cni" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" diff --git a/pkg/cmd/container/list.go b/pkg/cmd/container/list.go index c4279ad40d6..f356b9d8153 100644 --- a/pkg/cmd/container/list.go +++ b/pkg/cmd/container/list.go @@ -24,10 +24,10 @@ import ( "strings" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/pkg/progress" - "github.com/containerd/containerd/snapshots" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/snapshots" + "github.com/containerd/containerd/v2/pkg/progress" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerdutil" diff --git a/pkg/cmd/container/list_util.go b/pkg/cmd/container/list_util.go index 50f1f8b7251..b1b1906b254 100644 --- a/pkg/cmd/container/list_util.go +++ b/pkg/cmd/container/list_util.go @@ -23,8 +23,8 @@ import ( "strings" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/containerutil" ) diff --git a/pkg/cmd/container/logs.go b/pkg/cmd/container/logs.go index 1cc79c02bf2..1d9193e804b 100644 --- a/pkg/cmd/container/logs.go +++ b/pkg/cmd/container/logs.go @@ -23,8 +23,8 @@ import ( "os/signal" "syscall" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/api/types/cri" diff --git a/pkg/cmd/container/pause.go b/pkg/cmd/container/pause.go index 11bcbd02613..0e3664ca7d1 100644 --- a/pkg/cmd/container/pause.go +++ b/pkg/cmd/container/pause.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerutil" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" diff --git a/pkg/cmd/container/prune.go b/pkg/cmd/container/prune.go index cc36e77a126..3e6d33fba44 100644 --- a/pkg/cmd/container/prune.go +++ b/pkg/cmd/container/prune.go @@ -22,7 +22,7 @@ import ( "fmt" "strings" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" ) diff --git a/pkg/cmd/container/remove.go b/pkg/cmd/container/remove.go index 56cdcc3ebea..ba738f69d95 100644 --- a/pkg/cmd/container/remove.go +++ b/pkg/cmd/container/remove.go @@ -25,10 +25,10 @@ import ( "runtime" "syscall" - "github.com/containerd/containerd" - "github.com/containerd/containerd/cio" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/namespaces" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/cio" + "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" diff --git a/pkg/cmd/container/rename.go b/pkg/cmd/container/rename.go index 959bf68152e..cc9cf145fe8 100644 --- a/pkg/cmd/container/rename.go +++ b/pkg/cmd/container/rename.go @@ -21,7 +21,7 @@ import ( "fmt" "runtime" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/dnsutil/hostsstore" diff --git a/pkg/cmd/container/restart.go b/pkg/cmd/container/restart.go index a24a5f641d3..a67093c7122 100644 --- a/pkg/cmd/container/restart.go +++ b/pkg/cmd/container/restart.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerutil" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" diff --git a/pkg/cmd/container/run_cgroup_freebsd.go b/pkg/cmd/container/run_cgroup_freebsd.go index fcf07cb7bb2..b250500f6cb 100644 --- a/pkg/cmd/container/run_cgroup_freebsd.go +++ b/pkg/cmd/container/run_cgroup_freebsd.go @@ -17,7 +17,7 @@ package container import ( - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/api/types" ) diff --git a/pkg/cmd/container/run_cgroup_linux.go b/pkg/cmd/container/run_cgroup_linux.go index b81b3c3c382..c979dd18bc8 100644 --- a/pkg/cmd/container/run_cgroup_linux.go +++ b/pkg/cmd/container/run_cgroup_linux.go @@ -23,8 +23,8 @@ import ( "path/filepath" "strings" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/infoutil" diff --git a/pkg/cmd/container/run_cgroup_windows.go b/pkg/cmd/container/run_cgroup_windows.go index fcf07cb7bb2..b250500f6cb 100644 --- a/pkg/cmd/container/run_cgroup_windows.go +++ b/pkg/cmd/container/run_cgroup_windows.go @@ -17,7 +17,7 @@ package container import ( - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/api/types" ) diff --git a/pkg/cmd/container/run_freebsd.go b/pkg/cmd/container/run_freebsd.go index 87a07a12753..962f74ad6fc 100644 --- a/pkg/cmd/container/run_freebsd.go +++ b/pkg/cmd/container/run_freebsd.go @@ -19,9 +19,9 @@ package container import ( "context" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/api/types" ) diff --git a/pkg/cmd/container/run_gpus.go b/pkg/cmd/container/run_gpus.go index 9c3891c053d..da8245299d4 100644 --- a/pkg/cmd/container/run_gpus.go +++ b/pkg/cmd/container/run_gpus.go @@ -23,8 +23,8 @@ import ( "strconv" "strings" - "github.com/containerd/containerd/contrib/nvidia" - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/contrib/nvidia" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" ) diff --git a/pkg/cmd/container/run_linux.go b/pkg/cmd/container/run_linux.go index 89fdb73cd8d..f1ac8099451 100644 --- a/pkg/cmd/container/run_linux.go +++ b/pkg/cmd/container/run_linux.go @@ -21,10 +21,10 @@ import ( "fmt" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" - "github.com/containerd/containerd/pkg/userns" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/containerd/v2/pkg/userns" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/bypass4netnsutil" diff --git a/pkg/cmd/container/run_mount.go b/pkg/cmd/container/run_mount.go index 3a53c8c6f70..ae0bf38a13b 100644 --- a/pkg/cmd/container/run_mount.go +++ b/pkg/cmd/container/run_mount.go @@ -27,14 +27,14 @@ import ( "strings" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/leases" - "github.com/containerd/containerd/mount" - "github.com/containerd/containerd/oci" - "github.com/containerd/containerd/pkg/userns" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/core/leases" + "github.com/containerd/containerd/v2/core/mount" + "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/containerd/v2/pkg/userns" "github.com/containerd/continuity/fs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/volume" diff --git a/pkg/cmd/container/run_restart.go b/pkg/cmd/container/run_restart.go index b300dc0698d..d7b97d09389 100644 --- a/pkg/cmd/container/run_restart.go +++ b/pkg/cmd/container/run_restart.go @@ -21,8 +21,8 @@ import ( "fmt" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/runtime/restart" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/runtime/restart" "github.com/containerd/nerdctl/v2/pkg/strutil" ) @@ -32,7 +32,7 @@ func checkRestartCapabilities(ctx context.Context, client *containerd.Client, re case "", "no": return true, nil } - res, err := client.IntrospectionService().Plugins(ctx, []string{"id==restart"}) + res, err := client.IntrospectionService().Plugins(ctx, "id==restart") if err != nil { return false, err } diff --git a/pkg/cmd/container/run_runtime.go b/pkg/cmd/container/run_runtime.go index 279a10be629..4264ac63047 100644 --- a/pkg/cmd/container/run_runtime.go +++ b/pkg/cmd/container/run_runtime.go @@ -20,17 +20,18 @@ import ( "context" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" - "github.com/containerd/containerd/plugin" - runcoptions "github.com/containerd/containerd/runtime/v2/runc/options" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" + // runcoptions "github.com/containerd/containerd/v2/core/runtime/v2/runc/options" + runcoptions "github.com/containerd/containerd/api/types/runc/options" + "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/containerd/v2/plugins" "github.com/containerd/log" "github.com/opencontainers/runtime-spec/specs-go" ) func generateRuntimeCOpts(cgroupManager, runtimeStr string) ([]containerd.NewContainerOpts, error) { - runtime := plugin.RuntimeRuncV2 + runtime := plugins.RuntimeRuncV2 var ( runcOpts runcoptions.Options runtimeOpts interface{} = &runcOpts diff --git a/pkg/cmd/container/run_security_linux.go b/pkg/cmd/container/run_security_linux.go index 5b74cce49f9..3681c6845a1 100644 --- a/pkg/cmd/container/run_security_linux.go +++ b/pkg/cmd/container/run_security_linux.go @@ -21,10 +21,10 @@ import ( "strings" "sync" - "github.com/containerd/containerd/contrib/apparmor" - "github.com/containerd/containerd/contrib/seccomp" - "github.com/containerd/containerd/oci" - "github.com/containerd/containerd/pkg/cap" + "github.com/containerd/containerd/v2/contrib/apparmor" + "github.com/containerd/containerd/v2/contrib/seccomp" + "github.com/containerd/containerd/v2/pkg/cap" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/apparmorutil" "github.com/containerd/nerdctl/v2/pkg/defaults" diff --git a/pkg/cmd/container/run_ulimit.go b/pkg/cmd/container/run_ulimit.go index 5b825a7ec16..6a83ea9f72d 100644 --- a/pkg/cmd/container/run_ulimit.go +++ b/pkg/cmd/container/run_ulimit.go @@ -20,8 +20,8 @@ import ( "context" "strings" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/strutil" "github.com/docker/go-units" "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/cmd/container/run_user.go b/pkg/cmd/container/run_user.go index 7bc9324694b..f03342897e5 100644 --- a/pkg/cmd/container/run_user.go +++ b/pkg/cmd/container/run_user.go @@ -21,8 +21,8 @@ import ( "fmt" "strconv" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/pkg/oci" ) func generateUserOpts(user string) ([]oci.SpecOpts, error) { diff --git a/pkg/cmd/container/run_windows.go b/pkg/cmd/container/run_windows.go index 4e2f5fe07b5..7c550cc2a8b 100644 --- a/pkg/cmd/container/run_windows.go +++ b/pkg/cmd/container/run_windows.go @@ -22,9 +22,9 @@ import ( "fmt" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/docker/go-units" "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/cmd/container/start.go b/pkg/cmd/container/start.go index 926c521f6df..a29f900c831 100644 --- a/pkg/cmd/container/start.go +++ b/pkg/cmd/container/start.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerutil" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" diff --git a/pkg/cmd/container/stats.go b/pkg/cmd/container/stats.go index de44e7226e0..b36ae484eb2 100644 --- a/pkg/cmd/container/stats.go +++ b/pkg/cmd/container/stats.go @@ -27,10 +27,10 @@ import ( "text/template" "time" - "github.com/containerd/containerd" eventstypes "github.com/containerd/containerd/api/events" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/events" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/events" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" diff --git a/pkg/cmd/container/stop.go b/pkg/cmd/container/stop.go index 35457835d0d..a385cbd4bec 100644 --- a/pkg/cmd/container/stop.go +++ b/pkg/cmd/container/stop.go @@ -20,8 +20,8 @@ import ( "context" "fmt" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/errdefs" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerutil" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" diff --git a/pkg/cmd/container/top.go b/pkg/cmd/container/top.go index 2f4cae35c4c..d73fa02dcdb 100644 --- a/pkg/cmd/container/top.go +++ b/pkg/cmd/container/top.go @@ -32,7 +32,7 @@ import ( "strconv" "strings" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" ) diff --git a/pkg/cmd/container/top_unix.go b/pkg/cmd/container/top_unix.go index e5f04ef60d1..0504849673c 100644 --- a/pkg/cmd/container/top_unix.go +++ b/pkg/cmd/container/top_unix.go @@ -37,7 +37,7 @@ import ( "strings" "text/tabwriter" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" ) // containerTop was inspired from https://github.com/moby/moby/blob/v20.10.6/daemon/top_unix.go#L133-L189 diff --git a/pkg/cmd/container/top_windows.go b/pkg/cmd/container/top_windows.go index d5f68a35db9..eee445ae4b6 100644 --- a/pkg/cmd/container/top_windows.go +++ b/pkg/cmd/container/top_windows.go @@ -26,7 +26,7 @@ import ( "time" "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/typeurl/v2" "github.com/docker/go-units" ) diff --git a/pkg/cmd/container/unpause.go b/pkg/cmd/container/unpause.go index f0e6325e81f..bd6ba750d8e 100644 --- a/pkg/cmd/container/unpause.go +++ b/pkg/cmd/container/unpause.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerutil" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" diff --git a/pkg/cmd/container/wait.go b/pkg/cmd/container/wait.go index f726f81cd3a..31bd2daaf79 100644 --- a/pkg/cmd/container/wait.go +++ b/pkg/cmd/container/wait.go @@ -22,7 +22,7 @@ import ( "fmt" "io" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" ) diff --git a/pkg/cmd/image/convert.go b/pkg/cmd/image/convert.go index 0cb9c560f8c..c2ea9e14f3b 100644 --- a/pkg/cmd/image/convert.go +++ b/pkg/cmd/image/convert.go @@ -26,18 +26,17 @@ import ( "strings" overlaybdconvert "github.com/containerd/accelerated-container-image/pkg/convertor" - "github.com/containerd/containerd" - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/images/converter" - "github.com/containerd/containerd/images/converter/uncompress" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/images/converter" + "github.com/containerd/containerd/v2/core/images/converter/uncompress" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" - "github.com/containerd/nerdctl/v2/pkg/clientutil" converterutil "github.com/containerd/nerdctl/v2/pkg/imgutil/converter" "github.com/containerd/nerdctl/v2/pkg/platformutil" "github.com/containerd/nerdctl/v2/pkg/referenceutil" - nydusconvert "github.com/containerd/nydus-snapshotter/pkg/converter" + // nydusconvert "github.com/containerd/nydus-snapshotter/pkg/converter" "github.com/containerd/stargz-snapshotter/estargz" estargzconvert "github.com/containerd/stargz-snapshotter/nativeconverter/estargz" estargzexternaltocconvert "github.com/containerd/stargz-snapshotter/nativeconverter/estargz/externaltoc" @@ -132,30 +131,33 @@ func Convert(ctx context.Context, client *containerd.Client, srcRawRef, targetRa convertFunc = overlaybdconvert.IndexConvertFunc(obdOpts...) convertOpts = append(convertOpts, converter.WithIndexConvertFunc(convertFunc)) convertType = "overlaybd" - case nydus: - nydusOpts, err := getNydusConvertOpts(options) - if err != nil { - return err - } - convertHooks := converter.ConvertHooks{ - PostConvertHook: nydusconvert.ConvertHookFunc(nydusconvert.MergeOption{ - WorkDir: nydusOpts.WorkDir, - BuilderPath: nydusOpts.BuilderPath, - FsVersion: nydusOpts.FsVersion, - ChunkDictPath: nydusOpts.ChunkDictPath, - PrefetchPatterns: nydusOpts.PrefetchPatterns, - OCI: true, - }), - } - convertOpts = append(convertOpts, converter.WithIndexConvertFunc( - converter.IndexConvertFuncWithHook( - nydusconvert.LayerConvertFunc(*nydusOpts), - true, - platMC, - convertHooks, - )), - ) - convertType = "nydus" + /* + case nydus: + nydusOpts, err := getNydusConvertOpts(options) + if err != nil { + return err + } + convertHooks := converter.ConvertHooks{ + PostConvertHook: nydusconvert.ConvertHookFunc(nydusconvert.MergeOption{ + WorkDir: nydusOpts.WorkDir, + BuilderPath: nydusOpts.BuilderPath, + FsVersion: nydusOpts.FsVersion, + ChunkDictPath: nydusOpts.ChunkDictPath, + PrefetchPatterns: nydusOpts.PrefetchPatterns, + OCI: true, + }), + } + convertOpts = append(convertOpts, converter.WithIndexConvertFunc( + converter.IndexConvertFuncWithHook( + nydusconvert.LayerConvertFunc(*nydusOpts), + true, + platMC, + convertHooks, + )), + ) + convertType = "nydus" + + */ } if convertType != "overlaybd" { @@ -293,6 +295,7 @@ func getZstdchunkedConverter(options types.ImageConvertOptions) (converter.Conve return zstdchunkedconvert.LayerConvertFuncWithCompressionLevel(zstd.EncoderLevelFromZstd(options.ZstdChunkedCompressionLevel), esgzOpts...), nil } +/* func getNydusConvertOpts(options types.ImageConvertOptions) (*nydusconvert.PackOption, error) { workDir := options.NydusWorkDir if workDir == "" { @@ -314,6 +317,8 @@ func getNydusConvertOpts(options types.ImageConvertOptions) (*nydusconvert.PackO }, nil } +*/ + func getOBDConvertOpts(options types.ImageConvertOptions) ([]overlaybdconvert.Option, error) { obdOpts := []overlaybdconvert.Option{ overlaybdconvert.WithFsType(options.OverlayFsType), diff --git a/pkg/cmd/image/crypt.go b/pkg/cmd/image/crypt.go index be134fcf972..a4f967b5726 100644 --- a/pkg/cmd/image/crypt.go +++ b/pkg/cmd/image/crypt.go @@ -21,9 +21,9 @@ import ( "errors" "fmt" - "github.com/containerd/containerd" - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/images/converter" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/images/converter" "github.com/containerd/imgcrypt/images/encryption" "github.com/containerd/imgcrypt/images/encryption/parsehelpers" "github.com/containerd/nerdctl/v2/pkg/api/types" diff --git a/pkg/cmd/image/inspect.go b/pkg/cmd/image/inspect.go index aa54de9acb5..cd864fd2653 100644 --- a/pkg/cmd/image/inspect.go +++ b/pkg/cmd/image/inspect.go @@ -23,8 +23,8 @@ import ( "strings" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerdutil" diff --git a/pkg/cmd/image/list.go b/pkg/cmd/image/list.go index 95266e8dc18..be71a03d671 100644 --- a/pkg/cmd/image/list.go +++ b/pkg/cmd/image/list.go @@ -28,10 +28,10 @@ import ( "text/template" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/snapshots" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerdutil" diff --git a/pkg/cmd/image/load.go b/pkg/cmd/image/load.go index 1008900c88d..78b46b0dd8c 100644 --- a/pkg/cmd/image/load.go +++ b/pkg/cmd/image/load.go @@ -23,10 +23,10 @@ import ( "io" "os" - "github.com/containerd/containerd" - "github.com/containerd/containerd/archive/compression" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/images/archive" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/images/archive" + "github.com/containerd/containerd/v2/pkg/archive/compression" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/imgutil" "github.com/containerd/nerdctl/v2/pkg/platformutil" diff --git a/pkg/cmd/image/prune.go b/pkg/cmd/image/prune.go index f290925f689..d31e8aea005 100644 --- a/pkg/cmd/image/prune.go +++ b/pkg/cmd/image/prune.go @@ -20,8 +20,8 @@ import ( "context" "fmt" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/imgutil" diff --git a/pkg/cmd/image/pull.go b/pkg/cmd/image/pull.go index 0a87df16d5a..3377869ae7e 100644 --- a/pkg/cmd/image/pull.go +++ b/pkg/cmd/image/pull.go @@ -22,7 +22,7 @@ import ( "os" "path/filepath" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/imgutil" "github.com/containerd/nerdctl/v2/pkg/ipfs" diff --git a/pkg/cmd/image/push.go b/pkg/cmd/image/push.go index f8f2348b683..1ac85f76d55 100644 --- a/pkg/cmd/image/push.go +++ b/pkg/cmd/image/push.go @@ -19,18 +19,19 @@ package image import ( "context" "fmt" + "github.com/opencontainers/go-digest" "io" "os" "path/filepath" - "github.com/containerd/containerd" - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/images/converter" - "github.com/containerd/containerd/reference" - "github.com/containerd/containerd/remotes" - "github.com/containerd/containerd/remotes/docker" - dockerconfig "github.com/containerd/containerd/remotes/docker/config" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/images/converter" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker" + dockerconfig "github.com/containerd/containerd/v2/core/remotes/docker/config" + "github.com/containerd/containerd/v2/pkg/reference" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/errutil" @@ -45,7 +46,6 @@ import ( "github.com/containerd/stargz-snapshotter/estargz/zstdchunked" estargzconvert "github.com/containerd/stargz-snapshotter/nativeconverter/estargz" distributionref "github.com/distribution/reference" - "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/pkg/cmd/image/remove.go b/pkg/cmd/image/remove.go index 824cd404cd6..53bd8b02a25 100644 --- a/pkg/cmd/image/remove.go +++ b/pkg/cmd/image/remove.go @@ -22,8 +22,8 @@ import ( "fmt" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/containerutil" diff --git a/pkg/cmd/image/save.go b/pkg/cmd/image/save.go index db910323a89..8d6a2601269 100644 --- a/pkg/cmd/image/save.go +++ b/pkg/cmd/image/save.go @@ -20,8 +20,8 @@ import ( "context" "fmt" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images/archive" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images/archive" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/idutil/imagewalker" "github.com/containerd/nerdctl/v2/pkg/platformutil" diff --git a/pkg/cmd/image/tag.go b/pkg/cmd/image/tag.go index 4543f2a070d..ae450408165 100644 --- a/pkg/cmd/image/tag.go +++ b/pkg/cmd/image/tag.go @@ -20,8 +20,8 @@ import ( "context" "fmt" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/errdefs" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/idutil/imagewalker" "github.com/containerd/nerdctl/v2/pkg/referenceutil" diff --git a/pkg/cmd/login/login.go b/pkg/cmd/login/login.go index 64573c7e0e5..2ed5b72544f 100644 --- a/pkg/cmd/login/login.go +++ b/pkg/cmd/login/login.go @@ -27,8 +27,8 @@ import ( "os" "strings" - "github.com/containerd/containerd/remotes/docker" - "github.com/containerd/containerd/remotes/docker/config" + "github.com/containerd/containerd/v2/core/remotes/docker" + "github.com/containerd/containerd/v2/core/remotes/docker/config" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/errutil" diff --git a/pkg/cmd/namespace/create.go b/pkg/cmd/namespace/create.go index 6f79e999797..91fef5fd094 100644 --- a/pkg/cmd/namespace/create.go +++ b/pkg/cmd/namespace/create.go @@ -19,7 +19,7 @@ package namespace import ( "context" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" ) diff --git a/pkg/cmd/namespace/inspect.go b/pkg/cmd/namespace/inspect.go index 3f602ef6187..761891692b9 100644 --- a/pkg/cmd/namespace/inspect.go +++ b/pkg/cmd/namespace/inspect.go @@ -19,8 +19,8 @@ package namespace import ( "context" - "github.com/containerd/containerd" - "github.com/containerd/containerd/namespaces" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/namespaces" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/formatter" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/native" diff --git a/pkg/cmd/namespace/namespace_freebsd.go b/pkg/cmd/namespace/namespace_freebsd.go index a5448749201..a3a45d59168 100644 --- a/pkg/cmd/namespace/namespace_freebsd.go +++ b/pkg/cmd/namespace/namespace_freebsd.go @@ -17,7 +17,7 @@ package namespace import ( - "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/v2/pkg/namespaces" ) func namespaceDeleteOpts(cgroup bool) ([]namespaces.DeleteOpts, error) { diff --git a/pkg/cmd/namespace/namespace_linux.go b/pkg/cmd/namespace/namespace_linux.go index e13b331fa95..96255cdcb5e 100644 --- a/pkg/cmd/namespace/namespace_linux.go +++ b/pkg/cmd/namespace/namespace_linux.go @@ -17,8 +17,8 @@ package namespace import ( - "github.com/containerd/containerd/namespaces" - "github.com/containerd/containerd/runtime/opts" + "github.com/containerd/containerd/v2/core/runtime/opts" + "github.com/containerd/containerd/v2/pkg/namespaces" ) func namespaceDeleteOpts(cgroup bool) ([]namespaces.DeleteOpts, error) { diff --git a/pkg/cmd/namespace/namespace_windows.go b/pkg/cmd/namespace/namespace_windows.go index a5448749201..a3a45d59168 100644 --- a/pkg/cmd/namespace/namespace_windows.go +++ b/pkg/cmd/namespace/namespace_windows.go @@ -17,7 +17,7 @@ package namespace import ( - "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/v2/pkg/namespaces" ) func namespaceDeleteOpts(cgroup bool) ([]namespaces.DeleteOpts, error) { diff --git a/pkg/cmd/namespace/remove.go b/pkg/cmd/namespace/remove.go index a4de8514e87..e4b1f9c24f5 100644 --- a/pkg/cmd/namespace/remove.go +++ b/pkg/cmd/namespace/remove.go @@ -20,8 +20,8 @@ import ( "context" "fmt" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" ) diff --git a/pkg/cmd/namespace/update.go b/pkg/cmd/namespace/update.go index 3952f98a6cc..46694342af3 100644 --- a/pkg/cmd/namespace/update.go +++ b/pkg/cmd/namespace/update.go @@ -19,7 +19,7 @@ package namespace import ( "context" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" ) diff --git a/pkg/cmd/network/create.go b/pkg/cmd/network/create.go index 43f1f96d6ff..dd60901ea63 100644 --- a/pkg/cmd/network/create.go +++ b/pkg/cmd/network/create.go @@ -20,7 +20,7 @@ import ( "fmt" "io" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/netutil" ) diff --git a/pkg/cmd/network/prune.go b/pkg/cmd/network/prune.go index 9294583947c..f5063463a9f 100644 --- a/pkg/cmd/network/prune.go +++ b/pkg/cmd/network/prune.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/netutil" diff --git a/pkg/cmd/network/remove.go b/pkg/cmd/network/remove.go index 133a2b47bba..c50d1649528 100644 --- a/pkg/cmd/network/remove.go +++ b/pkg/cmd/network/remove.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/idutil/netwalker" "github.com/containerd/nerdctl/v2/pkg/netutil" diff --git a/pkg/cmd/system/events.go b/pkg/cmd/system/events.go index cb313eca2a7..945617a40e9 100644 --- a/pkg/cmd/system/events.go +++ b/pkg/cmd/system/events.go @@ -25,9 +25,9 @@ import ( "text/template" "time" - "github.com/containerd/containerd" _ "github.com/containerd/containerd/api/events" // Register grpc event types - "github.com/containerd/containerd/events" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/events" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/formatter" diff --git a/pkg/cmd/system/info.go b/pkg/cmd/system/info.go index 5e87cf24fc4..8a8c6352723 100644 --- a/pkg/cmd/system/info.go +++ b/pkg/cmd/system/info.go @@ -19,25 +19,25 @@ package system import ( "context" "fmt" + "github.com/docker/go-units" "io" "sort" "strings" "text/template" - "github.com/containerd/containerd" + "github.com/containerd/containerd/api/services/introspection/v1" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "golang.org/x/text/cases" "golang.org/x/text/language" - "github.com/containerd/containerd/api/services/introspection/v1" "github.com/containerd/nerdctl/v2/pkg/formatter" "github.com/containerd/nerdctl/v2/pkg/infoutil" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/dockercompat" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/native" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" "github.com/containerd/nerdctl/v2/pkg/strutil" - "github.com/docker/go-units" ) func Info(ctx context.Context, client *containerd.Client, options types.SystemInfoOptions) error { diff --git a/pkg/cmd/system/prune.go b/pkg/cmd/system/prune.go index efc1d934261..71c4cfa85d6 100644 --- a/pkg/cmd/system/prune.go +++ b/pkg/cmd/system/prune.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/builder" "github.com/containerd/nerdctl/v2/pkg/cmd/container" diff --git a/pkg/cmd/volume/create.go b/pkg/cmd/volume/create.go index c00fe00efa3..6fde6411af0 100644 --- a/pkg/cmd/volume/create.go +++ b/pkg/cmd/volume/create.go @@ -19,7 +19,7 @@ package volume import ( "fmt" - "github.com/containerd/containerd/identifiers" + "github.com/containerd/containerd/v2/pkg/identifiers" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/native" "github.com/containerd/nerdctl/v2/pkg/labels" diff --git a/pkg/cmd/volume/list.go b/pkg/cmd/volume/list.go index a0e275a10c0..e005d886a6a 100644 --- a/pkg/cmd/volume/list.go +++ b/pkg/cmd/volume/list.go @@ -25,7 +25,7 @@ import ( "text/tabwriter" "text/template" - "github.com/containerd/containerd/pkg/progress" + "github.com/containerd/containerd/v2/pkg/progress" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/formatter" diff --git a/pkg/cmd/volume/prune.go b/pkg/cmd/volume/prune.go index f9dff99f428..2a9002a9f13 100644 --- a/pkg/cmd/volume/prune.go +++ b/pkg/cmd/volume/prune.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/labels" ) diff --git a/pkg/cmd/volume/rm.go b/pkg/cmd/volume/rm.go index 2c74df9f1b2..2327ae07969 100644 --- a/pkg/cmd/volume/rm.go +++ b/pkg/cmd/volume/rm.go @@ -22,8 +22,8 @@ import ( "errors" "fmt" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/dockercompat" diff --git a/pkg/composer/composer.go b/pkg/composer/composer.go index 16f97efcc93..2adf7459433 100644 --- a/pkg/composer/composer.go +++ b/pkg/composer/composer.go @@ -25,8 +25,8 @@ import ( composecli "github.com/compose-spec/compose-go/v2/cli" compose "github.com/compose-spec/compose-go/v2/types" - "github.com/containerd/containerd" - "github.com/containerd/containerd/identifiers" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/identifiers" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/composer/serviceparser" "github.com/containerd/nerdctl/v2/pkg/reflectutil" diff --git a/pkg/composer/container.go b/pkg/composer/container.go index 3a0169e74dc..53525457a87 100644 --- a/pkg/composer/container.go +++ b/pkg/composer/container.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/labels" ) diff --git a/pkg/composer/copy.go b/pkg/composer/copy.go index 0442b5775ae..9e90e91e034 100644 --- a/pkg/composer/copy.go +++ b/pkg/composer/copy.go @@ -22,7 +22,7 @@ import ( "fmt" "strings" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/labels" "github.com/docker/docker/pkg/system" diff --git a/pkg/composer/exec.go b/pkg/composer/exec.go index 1d8ab64f069..df1ae533714 100644 --- a/pkg/composer/exec.go +++ b/pkg/composer/exec.go @@ -24,7 +24,7 @@ import ( "strconv" "strings" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/composer/serviceparser" "github.com/containerd/nerdctl/v2/pkg/labels" diff --git a/pkg/composer/logs.go b/pkg/composer/logs.go index f1493004d3a..91889692e12 100644 --- a/pkg/composer/logs.go +++ b/pkg/composer/logs.go @@ -25,7 +25,7 @@ import ( "strings" "github.com/compose-spec/compose-go/v2/types" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/composer/pipetagger" "github.com/containerd/nerdctl/v2/pkg/composer/serviceparser" diff --git a/pkg/composer/orphans.go b/pkg/composer/orphans.go index 2df49253132..ed5028c3da0 100644 --- a/pkg/composer/orphans.go +++ b/pkg/composer/orphans.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/composer/serviceparser" "github.com/containerd/nerdctl/v2/pkg/labels" ) diff --git a/pkg/composer/pause.go b/pkg/composer/pause.go index 4817a5710d6..cb7352e06ff 100644 --- a/pkg/composer/pause.go +++ b/pkg/composer/pause.go @@ -22,7 +22,7 @@ import ( "io" "sync" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/containerutil" "github.com/containerd/nerdctl/v2/pkg/labels" "golang.org/x/sync/errgroup" diff --git a/pkg/composer/restart.go b/pkg/composer/restart.go index 7768bb5e20d..d27b981d5dd 100644 --- a/pkg/composer/restart.go +++ b/pkg/composer/restart.go @@ -22,7 +22,7 @@ import ( "sync" "github.com/compose-spec/compose-go/v2/types" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/labels" ) diff --git a/pkg/composer/rm.go b/pkg/composer/rm.go index 86cae7c9000..590028c4d0e 100644 --- a/pkg/composer/rm.go +++ b/pkg/composer/rm.go @@ -21,7 +21,7 @@ import ( "strings" "sync" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/composer/serviceparser" "github.com/containerd/nerdctl/v2/pkg/formatter" diff --git a/pkg/composer/serviceparser/build.go b/pkg/composer/serviceparser/build.go index 48bd5f88e30..ec95fc66591 100644 --- a/pkg/composer/serviceparser/build.go +++ b/pkg/composer/serviceparser/build.go @@ -23,8 +23,8 @@ import ( "strings" "github.com/compose-spec/compose-go/v2/types" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/identifiers" + "github.com/containerd/containerd/v2/pkg/identifiers" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/reflectutil" diff --git a/pkg/composer/serviceparser/serviceparser.go b/pkg/composer/serviceparser/serviceparser.go index b84fac42ede..8faed02ac07 100644 --- a/pkg/composer/serviceparser/serviceparser.go +++ b/pkg/composer/serviceparser/serviceparser.go @@ -29,8 +29,8 @@ import ( "time" "github.com/compose-spec/compose-go/v2/types" - "github.com/containerd/containerd/contrib/nvidia" - "github.com/containerd/containerd/identifiers" + "github.com/containerd/containerd/v2/contrib/nvidia" + "github.com/containerd/containerd/v2/pkg/identifiers" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/reflectutil" ) diff --git a/pkg/composer/stop.go b/pkg/composer/stop.go index 6baa0f9edb2..eac5266c664 100644 --- a/pkg/composer/stop.go +++ b/pkg/composer/stop.go @@ -21,7 +21,7 @@ import ( "fmt" "sync" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/composer/serviceparser" "github.com/containerd/nerdctl/v2/pkg/labels" diff --git a/pkg/config/config.go b/pkg/config/config.go index 6c3273f9ea5..eaffe583260 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -17,9 +17,8 @@ package config import ( - "github.com/containerd/containerd" - "github.com/containerd/containerd/defaults" - "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/v2/defaults" + "github.com/containerd/containerd/v2/pkg/namespaces" ncdefaults "github.com/containerd/nerdctl/v2/pkg/defaults" ) @@ -49,7 +48,7 @@ func New() *Config { DebugFull: false, Address: defaults.DefaultAddress, Namespace: namespaces.Default, - Snapshotter: containerd.DefaultSnapshotter, + Snapshotter: defaults.DefaultSnapshotter, CNIPath: ncdefaults.CNIPath(), CNINetConfPath: ncdefaults.CNINetConfPath(), DataRoot: ncdefaults.DataRoot(), diff --git a/pkg/containerdutil/content.go b/pkg/containerdutil/content.go index 6c7742a3d29..46587fcae41 100644 --- a/pkg/containerdutil/content.go +++ b/pkg/containerdutil/content.go @@ -23,8 +23,8 @@ package containerdutil import ( "context" - "github.com/containerd/containerd" - "github.com/containerd/containerd/content" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/content" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/pkg/containerdutil/helpers.go b/pkg/containerdutil/helpers.go index 1d410035ffd..e341b38e06b 100644 --- a/pkg/containerdutil/helpers.go +++ b/pkg/containerdutil/helpers.go @@ -19,7 +19,7 @@ package containerdutil import ( "context" - "github.com/containerd/containerd/content" + "github.com/containerd/containerd/v2/core/content" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/pkg/containerdutil/snapshotter.go b/pkg/containerdutil/snapshotter.go index 738e98f7a69..bf35171b5cb 100644 --- a/pkg/containerdutil/snapshotter.go +++ b/pkg/containerdutil/snapshotter.go @@ -19,8 +19,8 @@ package containerdutil import ( "context" - "github.com/containerd/containerd" - "github.com/containerd/containerd/snapshots" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/snapshots" ) // SnapshotService should be called to get a new caching snapshotter diff --git a/pkg/containerinspector/containerinspector.go b/pkg/containerinspector/containerinspector.go index c60f90baca3..2e3fe0c86d1 100644 --- a/pkg/containerinspector/containerinspector.go +++ b/pkg/containerinspector/containerinspector.go @@ -19,8 +19,8 @@ package containerinspector import ( "context" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/native" "github.com/containerd/typeurl/v2" diff --git a/pkg/containerutil/config.go b/pkg/containerutil/config.go index 3031921222b..0a4a57892a6 100644 --- a/pkg/containerutil/config.go +++ b/pkg/containerutil/config.go @@ -24,8 +24,8 @@ import ( "runtime" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/oci" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/ipcutil" "github.com/containerd/nerdctl/v2/pkg/labels" "github.com/containerd/nerdctl/v2/pkg/netutil/nettype" diff --git a/pkg/containerutil/container_network_manager.go b/pkg/containerutil/container_network_manager.go index f6db2e78d55..fb246c748e0 100644 --- a/pkg/containerutil/container_network_manager.go +++ b/pkg/containerutil/container_network_manager.go @@ -27,9 +27,9 @@ import ( "runtime" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/dnsutil/hostsstore" diff --git a/pkg/containerutil/container_network_manager_linux.go b/pkg/containerutil/container_network_manager_linux.go index 534040f362d..7411525c11b 100644 --- a/pkg/containerutil/container_network_manager_linux.go +++ b/pkg/containerutil/container_network_manager_linux.go @@ -22,8 +22,8 @@ import ( "io/fs" "path/filepath" - "github.com/containerd/containerd" - "github.com/containerd/containerd/oci" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" diff --git a/pkg/containerutil/container_network_manager_other.go b/pkg/containerutil/container_network_manager_other.go index 1dabe5e6428..7f9b83b225f 100644 --- a/pkg/containerutil/container_network_manager_other.go +++ b/pkg/containerutil/container_network_manager_other.go @@ -23,8 +23,8 @@ import ( "fmt" "runtime" - "github.com/containerd/containerd" - "github.com/containerd/containerd/oci" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/api/types" ) diff --git a/pkg/containerutil/container_network_manager_windows.go b/pkg/containerutil/container_network_manager_windows.go index 399ac70bacb..e81ea4560a9 100644 --- a/pkg/containerutil/container_network_manager_windows.go +++ b/pkg/containerutil/container_network_manager_windows.go @@ -20,9 +20,9 @@ import ( "context" "fmt" - "github.com/containerd/containerd" - "github.com/containerd/containerd/oci" - "github.com/containerd/containerd/pkg/netns" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/netns" + "github.com/containerd/containerd/v2/pkg/oci" gocni "github.com/containerd/go-cni" "github.com/containerd/nerdctl/v2/pkg/api/types" diff --git a/pkg/containerutil/containerutil.go b/pkg/containerutil/containerutil.go index d61a478ccd3..38a875642f1 100644 --- a/pkg/containerutil/containerutil.go +++ b/pkg/containerutil/containerutil.go @@ -29,11 +29,11 @@ import ( "time" "github.com/containerd/console" - "github.com/containerd/containerd" - "github.com/containerd/containerd/cio" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" - "github.com/containerd/containerd/runtime/restart" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/core/runtime/restart" + "github.com/containerd/containerd/v2/pkg/cio" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/consoleutil" "github.com/containerd/nerdctl/v2/pkg/errutil" diff --git a/pkg/containerutil/cp_linux.go b/pkg/containerutil/cp_linux.go index 7e6ed4928b7..fd7f6e82b98 100644 --- a/pkg/containerutil/cp_linux.go +++ b/pkg/containerutil/cp_linux.go @@ -28,9 +28,9 @@ import ( "strconv" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/mount" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/mount" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" "github.com/containerd/nerdctl/v2/pkg/tarutil" diff --git a/pkg/defaults/defaults_linux.go b/pkg/defaults/defaults_linux.go index 6b30aca67a3..41e18118e5c 100644 --- a/pkg/defaults/defaults_linux.go +++ b/pkg/defaults/defaults_linux.go @@ -22,7 +22,7 @@ import ( "os" "path/filepath" - "github.com/containerd/containerd/plugin" + "github.com/containerd/containerd/v2/plugins" gocni "github.com/containerd/go-cni" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" @@ -31,7 +31,7 @@ import ( const ( AppArmorProfileName = "nerdctl-default" SeccompProfileName = "builtin" - Runtime = plugin.RuntimeRuncV2 + Runtime = plugins.RuntimeRuncV2 ) func DataRoot() string { diff --git a/pkg/dnsutil/hostsstore/hostsstore.go b/pkg/dnsutil/hostsstore/hostsstore.go index 1efe3002f37..7783da1da27 100644 --- a/pkg/dnsutil/hostsstore/hostsstore.go +++ b/pkg/dnsutil/hostsstore/hostsstore.go @@ -24,7 +24,7 @@ import ( "os" "path/filepath" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/nerdctl/v2/pkg/lockutil" types100 "github.com/containernetworking/cni/pkg/types/100" ) diff --git a/pkg/dnsutil/hostsstore/updater.go b/pkg/dnsutil/hostsstore/updater.go index e52ef802e47..5c68e52e89d 100644 --- a/pkg/dnsutil/hostsstore/updater.go +++ b/pkg/dnsutil/hostsstore/updater.go @@ -24,7 +24,7 @@ import ( "path/filepath" "strings" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/netutil" ) diff --git a/pkg/eventutil/eventutil.go b/pkg/eventutil/eventutil.go index fa4c7d8afe2..a624332e80d 100644 --- a/pkg/eventutil/eventutil.go +++ b/pkg/eventutil/eventutil.go @@ -19,7 +19,7 @@ package eventutil import ( "sync" - "github.com/containerd/containerd/events" + "github.com/containerd/containerd/v2/core/events" ) type eventHandler struct { diff --git a/pkg/formatter/formatter.go b/pkg/formatter/formatter.go index e8258bde35a..abae5c1c8ce 100644 --- a/pkg/formatter/formatter.go +++ b/pkg/formatter/formatter.go @@ -28,10 +28,10 @@ import ( "golang.org/x/text/cases" "golang.org/x/text/language" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/oci" - "github.com/containerd/containerd/runtime/restart" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/runtime/restart" + "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/portutil" "github.com/docker/go-units" diff --git a/pkg/idutil/containerwalker/containerwalker.go b/pkg/idutil/containerwalker/containerwalker.go index 94c497e9f10..b889682569a 100644 --- a/pkg/idutil/containerwalker/containerwalker.go +++ b/pkg/idutil/containerwalker/containerwalker.go @@ -22,7 +22,7 @@ import ( "regexp" "strings" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/nerdctl/v2/pkg/labels" ) diff --git a/pkg/idutil/imagewalker/imagewalker.go b/pkg/idutil/imagewalker/imagewalker.go index 68f8c9fe269..a500c66de57 100644 --- a/pkg/idutil/imagewalker/imagewalker.go +++ b/pkg/idutil/imagewalker/imagewalker.go @@ -22,8 +22,8 @@ import ( "regexp" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" "github.com/containerd/nerdctl/v2/pkg/referenceutil" "github.com/opencontainers/go-digest" ) diff --git a/pkg/imageinspector/imageinspector.go b/pkg/imageinspector/imageinspector.go index c5f34a8995f..b3bec918692 100644 --- a/pkg/imageinspector/imageinspector.go +++ b/pkg/imageinspector/imageinspector.go @@ -19,9 +19,9 @@ package imageinspector import ( "context" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/snapshots" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/imgutil" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/native" diff --git a/pkg/imgutil/commit/commit.go b/pkg/imgutil/commit/commit.go index 982ce2a846a..e844a601bd7 100644 --- a/pkg/imgutil/commit/commit.go +++ b/pkg/imgutil/commit/commit.go @@ -27,15 +27,15 @@ import ( "strings" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/cio" - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/diff" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/leases" - "github.com/containerd/containerd/rootfs" - "github.com/containerd/containerd/snapshots" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/diff" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/leases" + "github.com/containerd/containerd/v2/core/snapshots" + "github.com/containerd/containerd/v2/pkg/cio" + "github.com/containerd/containerd/v2/pkg/rootfs" + "github.com/containerd/errdefs" "github.com/containerd/log" imgutil "github.com/containerd/nerdctl/v2/pkg/imgutil" "github.com/containerd/nerdctl/v2/pkg/labels" diff --git a/pkg/imgutil/converter/zstd.go b/pkg/imgutil/converter/zstd.go index 6d85dabc5ed..417175253d5 100644 --- a/pkg/imgutil/converter/zstd.go +++ b/pkg/imgutil/converter/zstd.go @@ -21,12 +21,12 @@ import ( "fmt" "io" - "github.com/containerd/containerd/archive/compression" - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/images/converter" - "github.com/containerd/containerd/images/converter/uncompress" + "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/images/converter" + "github.com/containerd/containerd/v2/core/images/converter/uncompress" + "github.com/containerd/containerd/v2/pkg/archive/compression" + "github.com/containerd/errdefs" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/klauspost/compress/zstd" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/pkg/imgutil/dockerconfigresolver/dockerconfigresolver.go b/pkg/imgutil/dockerconfigresolver/dockerconfigresolver.go index f58cfde0543..af59898e93f 100644 --- a/pkg/imgutil/dockerconfigresolver/dockerconfigresolver.go +++ b/pkg/imgutil/dockerconfigresolver/dockerconfigresolver.go @@ -23,10 +23,10 @@ import ( "fmt" "os" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/remotes" - "github.com/containerd/containerd/remotes/docker" - dockerconfig "github.com/containerd/containerd/remotes/docker/config" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker" + dockerconfig "github.com/containerd/containerd/v2/core/remotes/docker/config" + "github.com/containerd/errdefs" "github.com/containerd/log" dockercliconfig "github.com/docker/cli/cli/config" "github.com/docker/cli/cli/config/credentials" diff --git a/pkg/imgutil/filtering.go b/pkg/imgutil/filtering.go index ea01e781211..f34cbf48234 100644 --- a/pkg/imgutil/filtering.go +++ b/pkg/imgutil/filtering.go @@ -23,8 +23,8 @@ import ( "strings" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/referenceutil" distributionref "github.com/distribution/reference" diff --git a/pkg/imgutil/imgutil.go b/pkg/imgutil/imgutil.go index f632004093f..b6fee67d5e8 100644 --- a/pkg/imgutil/imgutil.go +++ b/pkg/imgutil/imgutil.go @@ -23,11 +23,11 @@ import ( "io" "reflect" - "github.com/containerd/containerd" - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/remotes" - "github.com/containerd/containerd/snapshots" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/imgcrypt" "github.com/containerd/imgcrypt/images/encryption" "github.com/containerd/log" diff --git a/pkg/imgutil/jobs/jobs.go b/pkg/imgutil/jobs/jobs.go index d03143d956e..b56db6bfa03 100644 --- a/pkg/imgutil/jobs/jobs.go +++ b/pkg/imgutil/jobs/jobs.go @@ -24,10 +24,10 @@ import ( "text/tabwriter" "time" - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/pkg/progress" - "github.com/containerd/containerd/remotes" + "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/pkg/progress" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/pkg/imgutil/pull/pull.go b/pkg/imgutil/pull/pull.go index dae303eaa1c..01e5b9db250 100644 --- a/pkg/imgutil/pull/pull.go +++ b/pkg/imgutil/pull/pull.go @@ -21,9 +21,9 @@ import ( "context" "io" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/remotes" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/imgutil/jobs" "github.com/containerd/nerdctl/v2/pkg/platformutil" diff --git a/pkg/imgutil/push/push.go b/pkg/imgutil/push/push.go index 7307a66b3b3..919ff253290 100644 --- a/pkg/imgutil/push/push.go +++ b/pkg/imgutil/push/push.go @@ -25,11 +25,11 @@ import ( "text/tabwriter" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/pkg/progress" - "github.com/containerd/containerd/remotes" - "github.com/containerd/containerd/remotes/docker" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker" + "github.com/containerd/containerd/v2/pkg/progress" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/imgutil/jobs" "github.com/containerd/platforms" diff --git a/pkg/imgutil/snapshotter.go b/pkg/imgutil/snapshotter.go index 9fd30e72f8c..4b399818a23 100644 --- a/pkg/imgutil/snapshotter.go +++ b/pkg/imgutil/snapshotter.go @@ -19,14 +19,12 @@ package imgutil import ( "strings" - socisource "github.com/awslabs/soci-snapshotter/fs/source" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images" - ctdsnapshotters "github.com/containerd/containerd/pkg/snapshotters" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" + ctdsnapshotters "github.com/containerd/containerd/v2/pkg/snapshotters" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/imgutil/pull" - "github.com/containerd/stargz-snapshotter/fs/source" ) const ( @@ -111,9 +109,11 @@ func (dsn *defaultSnapshotterOpts) isRemote() bool { } func stargzExtraLabels(f func(images.Handler) images.Handler, rFlags types.RemoteSnapshotterFlags) func(images.Handler) images.Handler { - return source.AppendExtraLabelsHandler(prefetchSize, f) + return nil + // return source.AppendExtraLabelsHandler(prefetchSize, f) } func sociExtraLabels(f func(images.Handler) images.Handler, rFlags types.RemoteSnapshotterFlags) func(images.Handler) images.Handler { - return socisource.AppendDefaultLabelsHandlerWrapper(rFlags.SociIndexDigest, f) + return nil + // return socisource.AppendDefaultLabelsHandlerWrapper(rFlags.SociIndexDigest, f) } diff --git a/pkg/imgutil/snapshotter_test.go b/pkg/imgutil/snapshotter_test.go index e719b8086b0..375b1ccfb86 100644 --- a/pkg/imgutil/snapshotter_test.go +++ b/pkg/imgutil/snapshotter_test.go @@ -21,8 +21,8 @@ import ( "reflect" "testing" - "github.com/containerd/containerd" - ctdsnapshotters "github.com/containerd/containerd/pkg/snapshotters" + containerd "github.com/containerd/containerd/v2/client" + ctdsnapshotters "github.com/containerd/containerd/v2/pkg/snapshotters" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/imgutil/pull" digest "github.com/opencontainers/go-digest" diff --git a/pkg/infoutil/infoutil.go b/pkg/infoutil/infoutil.go index 3b4c57e6968..41721736e01 100644 --- a/pkg/infoutil/infoutil.go +++ b/pkg/infoutil/infoutil.go @@ -19,16 +19,16 @@ package infoutil import ( "context" "fmt" + semver "github.com/Masterminds/semver/v3" "os" "os/exec" "runtime" "strings" "time" - "github.com/Masterminds/semver/v3" - "github.com/containerd/containerd" - ptypes "github.com/containerd/containerd/protobuf/types" - "github.com/containerd/containerd/services/introspection" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/introspection" + ptypes "github.com/containerd/containerd/v2/pkg/protobuf/types" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/buildkitutil" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/dockercompat" @@ -39,11 +39,11 @@ import ( func NativeDaemonInfo(ctx context.Context, client *containerd.Client) (*native.DaemonInfo, error) { introService := client.IntrospectionService() - plugins, err := introService.Plugins(ctx, nil) + plugins, err := introService.Plugins(ctx) if err != nil { return nil, err } - server, err := introService.Server(ctx, &ptypes.Empty{}) + server, err := introService.Server(ctx) // , &ptypes.Empty{}) if err != nil { return nil, err } @@ -67,7 +67,7 @@ func Info(ctx context.Context, client *containerd.Client, snapshotter, cgroupMan return nil, err } introService := client.IntrospectionService() - daemonIntro, err := introService.Server(ctx, &ptypes.Empty{}) + daemonIntro, err := introService.Server(ctx) if err != nil { return nil, err } @@ -101,7 +101,7 @@ func Info(ctx context.Context, client *containerd.Client, snapshotter, cgroupMan func GetSnapshotterNames(ctx context.Context, introService introspection.Service) ([]string, error) { var names []string - plugins, err := introService.Plugins(ctx, nil) + plugins, err := introService.Plugins(ctx) if err != nil { return nil, err } diff --git a/pkg/infoutil/infoutil_freebsd.go b/pkg/infoutil/infoutil_freebsd.go index 4cf753ad9e4..b47c63df524 100644 --- a/pkg/infoutil/infoutil_freebsd.go +++ b/pkg/infoutil/infoutil_freebsd.go @@ -18,7 +18,7 @@ package infoutil import ( "github.com/containerd/nerdctl/v2/pkg/inspecttypes/dockercompat" - "github.com/docker/docker/pkg/sysinfo" + "github.com/containerd/nerdctl/v2/pkg/sysinfo" ) const UnameO = "FreeBSD" diff --git a/pkg/infoutil/infoutil_linux.go b/pkg/infoutil/infoutil_linux.go index 8dbe95274b5..c9a90c5b162 100644 --- a/pkg/infoutil/infoutil_linux.go +++ b/pkg/infoutil/infoutil_linux.go @@ -25,8 +25,8 @@ import ( "github.com/containerd/nerdctl/v2/pkg/defaults" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/dockercompat" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" + "github.com/containerd/nerdctl/v2/pkg/sysinfo" "github.com/docker/docker/pkg/meminfo" - "github.com/docker/docker/pkg/sysinfo" ) const UnameO = "GNU/Linux" diff --git a/pkg/infoutil/infoutil_windows.go b/pkg/infoutil/infoutil_windows.go index 7612bd2015a..117b81f4d5e 100644 --- a/pkg/infoutil/infoutil_windows.go +++ b/pkg/infoutil/infoutil_windows.go @@ -18,7 +18,7 @@ package infoutil import ( "github.com/containerd/nerdctl/v2/pkg/inspecttypes/dockercompat" - "github.com/docker/docker/pkg/sysinfo" + "github.com/containerd/nerdctl/v2/pkg/sysinfo" ) // UnameR returns `uname -r` diff --git a/pkg/inspecttypes/dockercompat/dockercompat.go b/pkg/inspecttypes/dockercompat/dockercompat.go index f23d27ff2d6..9e935626ea8 100644 --- a/pkg/inspecttypes/dockercompat/dockercompat.go +++ b/pkg/inspecttypes/dockercompat/dockercompat.go @@ -35,8 +35,8 @@ import ( "strings" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/runtime/restart" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/runtime/restart" "github.com/containerd/go-cni" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/imgutil" diff --git a/pkg/inspecttypes/dockercompat/dockercompat_test.go b/pkg/inspecttypes/dockercompat/dockercompat_test.go index 38dbb6835b3..4608e2b7813 100644 --- a/pkg/inspecttypes/dockercompat/dockercompat_test.go +++ b/pkg/inspecttypes/dockercompat/dockercompat_test.go @@ -22,8 +22,8 @@ import ( "runtime" "testing" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/native" "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/inspecttypes/native/container.go b/pkg/inspecttypes/native/container.go index a47b7de174d..de015dd5f94 100644 --- a/pkg/inspecttypes/native/container.go +++ b/pkg/inspecttypes/native/container.go @@ -19,8 +19,8 @@ package native import ( "net" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" ) // Container corresponds to a containerd-native container object. diff --git a/pkg/inspecttypes/native/image.go b/pkg/inspecttypes/native/image.go index 5eb5499b60d..742eb496f79 100644 --- a/pkg/inspecttypes/native/image.go +++ b/pkg/inspecttypes/native/image.go @@ -17,7 +17,7 @@ package native import ( - "github.com/containerd/containerd/images" + "github.com/containerd/containerd/v2/core/images" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/pkg/ipcutil/ipcutil.go b/pkg/ipcutil/ipcutil.go index 9a1ac8e9015..08dd67e7658 100644 --- a/pkg/ipcutil/ipcutil.go +++ b/pkg/ipcutil/ipcutil.go @@ -26,9 +26,9 @@ import ( "runtime" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/oci" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" "github.com/containerd/nerdctl/v2/pkg/labels" "github.com/docker/go-units" diff --git a/pkg/ipfs/image.go b/pkg/ipfs/image.go index 41e1b40f6cc..339e452f667 100644 --- a/pkg/ipfs/image.go +++ b/pkg/ipfs/image.go @@ -22,10 +22,10 @@ import ( "io" "os" - "github.com/containerd/containerd" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/images/converter" - "github.com/containerd/containerd/remotes" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/images/converter" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/idutil/imagewalker" diff --git a/pkg/ipfs/registry.go b/pkg/ipfs/registry.go index 76539826b12..c8917219789 100644 --- a/pkg/ipfs/registry.go +++ b/pkg/ipfs/registry.go @@ -29,8 +29,8 @@ import ( "strings" "time" - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/images" + "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/images" "github.com/containerd/log" ipfsclient "github.com/containerd/stargz-snapshotter/ipfs/client" "github.com/opencontainers/go-digest" diff --git a/pkg/logging/fluentd_logger.go b/pkg/logging/fluentd_logger.go index 5cc12e76c73..6267b058910 100644 --- a/pkg/logging/fluentd_logger.go +++ b/pkg/logging/fluentd_logger.go @@ -26,7 +26,7 @@ import ( "sync" "time" - "github.com/containerd/containerd/runtime/v2/logging" + "github.com/containerd/containerd/v2/core/runtime/v2/logging" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/strutil" "github.com/fluent/fluent-logger-golang/fluent" diff --git a/pkg/logging/journald_logger.go b/pkg/logging/journald_logger.go index 02d49b0c411..83fa7c6aa64 100644 --- a/pkg/logging/journald_logger.go +++ b/pkg/logging/journald_logger.go @@ -28,7 +28,7 @@ import ( "text/template" "time" - "github.com/containerd/containerd/runtime/v2/logging" + "github.com/containerd/containerd/v2/core/runtime/v2/logging" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/strutil" "github.com/coreos/go-systemd/v22/journal" diff --git a/pkg/logging/json_logger.go b/pkg/logging/json_logger.go index 6383eb3b768..12ae00dcea4 100644 --- a/pkg/logging/json_logger.go +++ b/pkg/logging/json_logger.go @@ -28,7 +28,7 @@ import ( "strings" "time" - "github.com/containerd/containerd/runtime/v2/logging" + "github.com/containerd/containerd/v2/core/runtime/v2/logging" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/logging/jsonfile" "github.com/containerd/nerdctl/v2/pkg/strutil" diff --git a/pkg/logging/logging.go b/pkg/logging/logging.go index 9339868f2a7..ca9f5b9ff14 100644 --- a/pkg/logging/logging.go +++ b/pkg/logging/logging.go @@ -28,8 +28,8 @@ import ( "sort" "sync" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/runtime/v2/logging" + "github.com/containerd/containerd/v2/core/runtime/v2/logging" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/muesli/cancelreader" ) diff --git a/pkg/logging/syslog_logger.go b/pkg/logging/syslog_logger.go index 398d3a8ea67..63805693279 100644 --- a/pkg/logging/syslog_logger.go +++ b/pkg/logging/syslog_logger.go @@ -31,7 +31,7 @@ import ( "github.com/docker/go-connections/tlsconfig" syslog "github.com/yuchanns/srslog" - "github.com/containerd/containerd/runtime/v2/logging" + "github.com/containerd/containerd/v2/core/runtime/v2/logging" "github.com/containerd/nerdctl/v2/pkg/strutil" ) diff --git a/pkg/mountutil/mountutil.go b/pkg/mountutil/mountutil.go index f8e184033b0..5b0564faab4 100644 --- a/pkg/mountutil/mountutil.go +++ b/pkg/mountutil/mountutil.go @@ -24,10 +24,10 @@ import ( "runtime" "strings" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/identifiers" - "github.com/containerd/containerd/oci" - "github.com/containerd/containerd/pkg/userns" + "github.com/containerd/containerd/v2/pkg/identifiers" + "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/containerd/v2/pkg/userns" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/idgen" "github.com/containerd/nerdctl/v2/pkg/mountutil/volumestore" diff --git a/pkg/mountutil/mountutil_freebsd.go b/pkg/mountutil/mountutil_freebsd.go index dd9433af559..5d32299a2ca 100644 --- a/pkg/mountutil/mountutil_freebsd.go +++ b/pkg/mountutil/mountutil_freebsd.go @@ -20,8 +20,8 @@ import ( "fmt" "strings" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/mountutil/volumestore" ) diff --git a/pkg/mountutil/mountutil_linux.go b/pkg/mountutil/mountutil_linux.go index d42112a2073..217e9480af4 100644 --- a/pkg/mountutil/mountutil_linux.go +++ b/pkg/mountutil/mountutil_linux.go @@ -25,9 +25,9 @@ import ( "strconv" "strings" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/mount" - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/core/containers" + "github.com/containerd/containerd/v2/core/mount" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/mountutil/volumestore" "github.com/docker/go-units" diff --git a/pkg/mountutil/mountutil_linux_test.go b/pkg/mountutil/mountutil_linux_test.go index 956dcd40447..00f5d2ba42b 100644 --- a/pkg/mountutil/mountutil_linux_test.go +++ b/pkg/mountutil/mountutil_linux_test.go @@ -21,8 +21,8 @@ import ( "strings" "testing" - "github.com/containerd/containerd/mount" - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/core/mount" + "github.com/containerd/containerd/v2/pkg/oci" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/native" mocks "github.com/containerd/nerdctl/v2/pkg/mountutil/mountutilmock" "github.com/opencontainers/runtime-spec/specs-go" diff --git a/pkg/mountutil/mountutil_windows.go b/pkg/mountutil/mountutil_windows.go index 7d9ff965349..e6782cb3405 100644 --- a/pkg/mountutil/mountutil_windows.go +++ b/pkg/mountutil/mountutil_windows.go @@ -29,8 +29,8 @@ import ( "regexp" "strings" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/v2/pkg/oci" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/mountutil/volumestore" ) diff --git a/pkg/mountutil/volumestore/volumestore.go b/pkg/mountutil/volumestore/volumestore.go index 8093212a7b7..62ea37689a9 100644 --- a/pkg/mountutil/volumestore/volumestore.go +++ b/pkg/mountutil/volumestore/volumestore.go @@ -23,8 +23,8 @@ import ( "os" "path/filepath" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/identifiers" + "github.com/containerd/containerd/v2/pkg/identifiers" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/native" "github.com/containerd/nerdctl/v2/pkg/lockutil" diff --git a/pkg/namestore/namestore.go b/pkg/namestore/namestore.go index 73e073b911a..0527b0efb68 100644 --- a/pkg/namestore/namestore.go +++ b/pkg/namestore/namestore.go @@ -22,7 +22,7 @@ import ( "path/filepath" "strings" - "github.com/containerd/containerd/identifiers" + "github.com/containerd/containerd/v2/pkg/identifiers" "github.com/containerd/nerdctl/v2/pkg/lockutil" ) diff --git a/pkg/netutil/netutil.go b/pkg/netutil/netutil.go index 10a4b99148b..eaafbeab132 100644 --- a/pkg/netutil/netutil.go +++ b/pkg/netutil/netutil.go @@ -30,9 +30,9 @@ import ( "strconv" "strings" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/namespaces" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/namespaces" + "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/labels" diff --git a/pkg/ocihook/ocihook_linux.go b/pkg/ocihook/ocihook_linux.go index 43cd714046d..831c7dba695 100644 --- a/pkg/ocihook/ocihook_linux.go +++ b/pkg/ocihook/ocihook_linux.go @@ -17,7 +17,7 @@ package ocihook import ( - "github.com/containerd/containerd/contrib/apparmor" + "github.com/containerd/containerd/v2/contrib/apparmor" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/apparmorutil" "github.com/containerd/nerdctl/v2/pkg/defaults" diff --git a/pkg/platformutil/layers.go b/pkg/platformutil/layers.go index 8f8aee20dee..1cc9f4e5467 100644 --- a/pkg/platformutil/layers.go +++ b/pkg/platformutil/layers.go @@ -19,8 +19,8 @@ package platformutil import ( "context" - "github.com/containerd/containerd/content" - "github.com/containerd/containerd/images" + "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/images" "github.com/containerd/platforms" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/pkg/rootlessutil/child_linux.go b/pkg/rootlessutil/child_linux.go index 1f6d82bc049..e422bff8b19 100644 --- a/pkg/rootlessutil/child_linux.go +++ b/pkg/rootlessutil/child_linux.go @@ -19,7 +19,7 @@ package rootlessutil import ( "os" - "github.com/containerd/containerd/pkg/userns" + "github.com/containerd/containerd/v2/pkg/userns" ) func IsRootlessChild() bool { diff --git a/pkg/rootlessutil/port_linux.go b/pkg/rootlessutil/port_linux.go index e8b166102eb..968d08245ae 100644 --- a/pkg/rootlessutil/port_linux.go +++ b/pkg/rootlessutil/port_linux.go @@ -20,7 +20,7 @@ import ( "context" "net" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" gocni "github.com/containerd/go-cni" "github.com/rootless-containers/rootlesskit/v2/pkg/api/client" "github.com/rootless-containers/rootlesskit/v2/pkg/port" diff --git a/pkg/signalutil/signals.go b/pkg/signalutil/signals.go index f3f627ed315..b35eacbb121 100644 --- a/pkg/signalutil/signals.go +++ b/pkg/signalutil/signals.go @@ -22,8 +22,8 @@ import ( "os/signal" "syscall" - "github.com/containerd/containerd" - "github.com/containerd/containerd/errdefs" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/pkg/strutil/strutil.go b/pkg/strutil/strutil.go index 233853a8068..f478bffa9b2 100644 --- a/pkg/strutil/strutil.go +++ b/pkg/strutil/strutil.go @@ -36,7 +36,7 @@ import ( "strconv" "strings" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" ) // ConvertKVStringsToMap is from https://github.com/moby/moby/blob/v20.10.0-rc2/runconfig/opts/parse.go diff --git a/pkg/sysinfo/cgroup2_linux.go b/pkg/sysinfo/cgroup2_linux.go new file mode 100644 index 00000000000..8b0e724750a --- /dev/null +++ b/pkg/sysinfo/cgroup2_linux.go @@ -0,0 +1,145 @@ +package sysinfo // import "github.com/docker/docker/pkg/sysinfo" + +import ( + "context" + "os" + "path" + "strings" + + "github.com/containerd/cgroups" + cgroupsV2 "github.com/containerd/cgroups/v3/cgroup2" + "github.com/containerd/containerd/v2/pkg/userns" + "github.com/containerd/log" +) + +func newV2(options ...Opt) *SysInfo { + sysInfo := &SysInfo{ + CgroupUnified: true, + cg2GroupPath: "/", + } + for _, o := range options { + o(sysInfo) + } + + ops := []infoCollector{ + applyNetworkingInfo, + applyAppArmorInfo, + applySeccompInfo, + applyCgroupNsInfo, + } + + m, err := cgroupsV2.Load(sysInfo.cg2GroupPath) + if err != nil { + log.G(context.TODO()).Warn(err) + } else { + sysInfo.cg2Controllers = make(map[string]struct{}) + controllers, err := m.Controllers() + if err != nil { + log.G(context.TODO()).Warn(err) + } + for _, c := range controllers { + sysInfo.cg2Controllers[c] = struct{}{} + } + ops = append(ops, + applyMemoryCgroupInfoV2, + applyCPUCgroupInfoV2, + applyIOCgroupInfoV2, + applyCPUSetCgroupInfoV2, + applyPIDSCgroupInfoV2, + applyDevicesCgroupInfoV2, + ) + } + + for _, o := range ops { + o(sysInfo) + } + return sysInfo +} + +func getSwapLimitV2() bool { + _, g, err := cgroups.ParseCgroupFileUnified("/proc/self/cgroup") + if err != nil { + return false + } + + if g == "" { + return false + } + + cGroupPath := path.Join("/sys/fs/cgroup", g, "memory.swap.max") + if _, err = os.Stat(cGroupPath); os.IsNotExist(err) { + return false + } + return true +} + +func applyMemoryCgroupInfoV2(info *SysInfo) { + if _, ok := info.cg2Controllers["memory"]; !ok { + info.Warnings = append(info.Warnings, "Unable to find memory controller") + return + } + + info.MemoryLimit = true + info.SwapLimit = getSwapLimitV2() + info.MemoryReservation = true + info.OomKillDisable = false + info.MemorySwappiness = false + info.KernelMemory = false + info.KernelMemoryTCP = false +} + +func applyCPUCgroupInfoV2(info *SysInfo) { + if _, ok := info.cg2Controllers["cpu"]; !ok { + info.Warnings = append(info.Warnings, "Unable to find cpu controller") + return + } + info.CPUShares = true + info.CPUCfs = true + info.CPURealtime = false +} + +func applyIOCgroupInfoV2(info *SysInfo) { + if _, ok := info.cg2Controllers["io"]; !ok { + info.Warnings = append(info.Warnings, "Unable to find io controller") + return + } + + info.BlkioWeight = true + info.BlkioWeightDevice = true + info.BlkioReadBpsDevice = true + info.BlkioWriteBpsDevice = true + info.BlkioReadIOpsDevice = true + info.BlkioWriteIOpsDevice = true +} + +func applyCPUSetCgroupInfoV2(info *SysInfo) { + if _, ok := info.cg2Controllers["cpuset"]; !ok { + info.Warnings = append(info.Warnings, "Unable to find cpuset controller") + return + } + info.Cpuset = true + + cpus, err := os.ReadFile(path.Join("/sys/fs/cgroup", info.cg2GroupPath, "cpuset.cpus.effective")) + if err != nil { + return + } + info.Cpus = strings.TrimSpace(string(cpus)) + + mems, err := os.ReadFile(path.Join("/sys/fs/cgroup", info.cg2GroupPath, "cpuset.mems.effective")) + if err != nil { + return + } + info.Mems = strings.TrimSpace(string(mems)) +} + +func applyPIDSCgroupInfoV2(info *SysInfo) { + if _, ok := info.cg2Controllers["pids"]; !ok { + info.Warnings = append(info.Warnings, "Unable to find pids controller") + return + } + info.PidsLimit = true +} + +func applyDevicesCgroupInfoV2(info *SysInfo) { + info.CgroupDevicesEnabled = !userns.RunningInUserNS() +} diff --git a/pkg/sysinfo/numcpu.go b/pkg/sysinfo/numcpu.go new file mode 100644 index 00000000000..26fe99cfcce --- /dev/null +++ b/pkg/sysinfo/numcpu.go @@ -0,0 +1,15 @@ +package sysinfo // import "github.com/docker/docker/pkg/sysinfo" + +import ( + "runtime" +) + +// NumCPU returns the number of CPUs. On Linux and Windows, it returns +// the number of CPUs which are currently online. On other platforms, +// it's the equivalent of [runtime.NumCPU]. +func NumCPU() int { + if ncpu := numCPU(); ncpu > 0 { + return ncpu + } + return runtime.NumCPU() +} diff --git a/pkg/sysinfo/numcpu_linux.go b/pkg/sysinfo/numcpu_linux.go new file mode 100644 index 00000000000..0f47c081d1c --- /dev/null +++ b/pkg/sysinfo/numcpu_linux.go @@ -0,0 +1,17 @@ +package sysinfo // import "github.com/docker/docker/pkg/sysinfo" + +import "golang.org/x/sys/unix" + +// numCPU queries the system for the count of threads available +// for use to this process. +// +// Returns 0 on errors. Use |runtime.NumCPU| in that case. +func numCPU() int { + // Gets the affinity mask for a process: The very one invoking this function. + var mask unix.CPUSet + err := unix.SchedGetaffinity(0, &mask) + if err != nil { + return 0 + } + return mask.Count() +} diff --git a/pkg/sysinfo/numcpu_other.go b/pkg/sysinfo/numcpu_other.go new file mode 100644 index 00000000000..fcafd56ae39 --- /dev/null +++ b/pkg/sysinfo/numcpu_other.go @@ -0,0 +1,8 @@ +//go:build !linux && !windows + +package sysinfo + +func numCPU() int { + // not implemented + return 0 +} diff --git a/pkg/sysinfo/numcpu_windows.go b/pkg/sysinfo/numcpu_windows.go new file mode 100644 index 00000000000..ff4753445a3 --- /dev/null +++ b/pkg/sysinfo/numcpu_windows.go @@ -0,0 +1,36 @@ +package sysinfo // import "github.com/docker/docker/pkg/sysinfo" + +import ( + "unsafe" + + "golang.org/x/sys/windows" +) + +var ( + kernel32 = windows.NewLazySystemDLL("kernel32.dll") + getCurrentProcess = kernel32.NewProc("GetCurrentProcess") + getProcessAffinityMask = kernel32.NewProc("GetProcessAffinityMask") +) + +// Returns bit count of 1, used by NumCPU +func popcnt(x uint64) (n byte) { + x -= (x >> 1) & 0x5555555555555555 + x = (x>>2)&0x3333333333333333 + x&0x3333333333333333 + x += x >> 4 + x &= 0x0f0f0f0f0f0f0f0f + x *= 0x0101010101010101 + return byte(x >> 56) +} + +func numCPU() int { + // Gets the affinity mask for a process + var mask, sysmask uintptr + currentProcess, _, _ := getCurrentProcess.Call() + ret, _, _ := getProcessAffinityMask.Call(currentProcess, uintptr(unsafe.Pointer(&mask)), uintptr(unsafe.Pointer(&sysmask))) + if ret == 0 { + return 0 + } + // For every available thread a bit is set in the mask. + ncpu := int(popcnt(uint64(mask))) + return ncpu +} diff --git a/pkg/sysinfo/sysinfo.go b/pkg/sysinfo/sysinfo.go new file mode 100644 index 00000000000..c41dbcb40cf --- /dev/null +++ b/pkg/sysinfo/sysinfo.go @@ -0,0 +1,170 @@ +// Package sysinfo stores information about which features a kernel supports. +package sysinfo // import "github.com/docker/docker/pkg/sysinfo" + +import "github.com/docker/docker/pkg/parsers" + +// Opt for New(). +type Opt func(info *SysInfo) + +// SysInfo stores information about which features a kernel supports. +// TODO Windows: Factor out platform specific capabilities. +type SysInfo struct { + // Whether the kernel supports AppArmor or not + AppArmor bool + // Whether the kernel supports Seccomp or not + Seccomp bool + + cgroupMemInfo + cgroupCPUInfo + cgroupBlkioInfo + cgroupCpusetInfo + cgroupPids + + // Whether the kernel supports cgroup namespaces or not + CgroupNamespaces bool + + // Whether IPv4 forwarding is supported or not, if this was disabled, networking will not work + IPv4ForwardingDisabled bool + + // Whether bridge-nf-call-iptables is supported or not + BridgeNFCallIPTablesDisabled bool + + // Whether bridge-nf-call-ip6tables is supported or not + BridgeNFCallIP6TablesDisabled bool + + // Whether the cgroup has the mountpoint of "devices" or not + CgroupDevicesEnabled bool + + // Whether the cgroup is in unified mode (v2). + CgroupUnified bool + + // Warnings contains a slice of warnings that occurred while collecting + // system information. These warnings are intended to be informational + // messages for the user, and can either be logged or returned to the + // client; they are not intended to be parsed / used for other purposes, + // and do not have a fixed format. + Warnings []string + + // cgMounts is the list of cgroup v1 mount paths, indexed by subsystem, to + // inspect availability of subsystems. + cgMounts map[string]string + + // cg2GroupPath is the cgroup v2 group path to inspect availability of the controllers. + cg2GroupPath string + + // cg2Controllers is an index of available cgroup v2 controllers. + cg2Controllers map[string]struct{} +} + +type cgroupMemInfo struct { + // Whether memory limit is supported or not + MemoryLimit bool + + // Whether swap limit is supported or not + SwapLimit bool + + // Whether soft limit is supported or not + MemoryReservation bool + + // Whether OOM killer disable is supported or not + OomKillDisable bool + + // Whether memory swappiness is supported or not + MemorySwappiness bool + + // Whether kernel memory limit is supported or not. This option is used to + // detect support for kernel-memory limits on API < v1.42. Kernel memory + // limit (`kmem.limit_in_bytes`) is not supported on cgroups v2, and has been + // removed in kernel 5.4. + KernelMemory bool + + // Whether kernel memory TCP limit is supported or not. Kernel memory TCP + // limit (`memory.kmem.tcp.limit_in_bytes`) is not supported on cgroups v2. + KernelMemoryTCP bool +} + +type cgroupCPUInfo struct { + // Whether CPU shares is supported or not + CPUShares bool + + // Whether CPU CFS (Completely Fair Scheduler) is supported + CPUCfs bool + + // Whether CPU real-time scheduler is supported + CPURealtime bool +} + +type cgroupBlkioInfo struct { + // Whether Block IO weight is supported or not + BlkioWeight bool + + // Whether Block IO weight_device is supported or not + BlkioWeightDevice bool + + // Whether Block IO read limit in bytes per second is supported or not + BlkioReadBpsDevice bool + + // Whether Block IO write limit in bytes per second is supported or not + BlkioWriteBpsDevice bool + + // Whether Block IO read limit in IO per second is supported or not + BlkioReadIOpsDevice bool + + // Whether Block IO write limit in IO per second is supported or not + BlkioWriteIOpsDevice bool +} + +type cgroupCpusetInfo struct { + // Whether Cpuset is supported or not + Cpuset bool + + // Available Cpuset's cpus + Cpus string + + // Available Cpuset's memory nodes + Mems string +} + +type cgroupPids struct { + // Whether Pids Limit is supported or not + PidsLimit bool +} + +// IsCpusetCpusAvailable returns `true` if the provided string set is contained +// in cgroup's cpuset.cpus set, `false` otherwise. +// If error is not nil a parsing error occurred. +func (c cgroupCpusetInfo) IsCpusetCpusAvailable(provided string) (bool, error) { + return isCpusetListAvailable(provided, c.Cpus) +} + +// IsCpusetMemsAvailable returns `true` if the provided string set is contained +// in cgroup's cpuset.mems set, `false` otherwise. +// If error is not nil a parsing error occurred. +func (c cgroupCpusetInfo) IsCpusetMemsAvailable(provided string) (bool, error) { + return isCpusetListAvailable(provided, c.Mems) +} + +func isCpusetListAvailable(provided, available string) (bool, error) { + parsedAvailable, err := parsers.ParseUintList(available) + if err != nil { + return false, err + } + // 8192 is the normal maximum number of CPUs in Linux, so accept numbers up to this + // or more if we actually have more CPUs. + maxCPUs := 8192 + for m := range parsedAvailable { + if m > maxCPUs { + maxCPUs = m + } + } + parsedProvided, err := parsers.ParseUintListMaximum(provided, maxCPUs) + if err != nil { + return false, err + } + for k := range parsedProvided { + if !parsedAvailable[k] { + return false, nil + } + } + return true, nil +} diff --git a/pkg/sysinfo/sysinfo_linux.go b/pkg/sysinfo/sysinfo_linux.go new file mode 100644 index 00000000000..e6bef324b0b --- /dev/null +++ b/pkg/sysinfo/sysinfo_linux.go @@ -0,0 +1,306 @@ +package sysinfo // import "github.com/docker/docker/pkg/sysinfo" + +import ( + "context" + "fmt" + "os" + "path" + "strings" + "sync" + + "github.com/containerd/cgroups/v3" + "github.com/containerd/cgroups/v3/cgroup1" + "github.com/containerd/containerd/v2/pkg/seccomp" + "github.com/containerd/log" + "github.com/moby/sys/mountinfo" +) + +var ( + readMountinfoOnce sync.Once + readMountinfoErr error + cgroupMountinfo []*mountinfo.Info +) + +// readCgroupMountinfo returns a list of cgroup v1 mounts (i.e. the ones +// with fstype of "cgroup") for the current running process. +// +// The results are cached (to avoid re-reading mountinfo which is relatively +// expensive), so it is assumed that cgroup mounts are not being changed. +func readCgroupMountinfo() ([]*mountinfo.Info, error) { + readMountinfoOnce.Do(func() { + cgroupMountinfo, readMountinfoErr = mountinfo.GetMounts( + mountinfo.FSTypeFilter("cgroup"), + ) + }) + + return cgroupMountinfo, readMountinfoErr +} + +func findCgroupV1Mountpoints() (map[string]string, error) { + mounts, err := readCgroupMountinfo() + if err != nil { + return nil, err + } + + allSubsystems, err := cgroup1.ParseCgroupFile("/proc/self/cgroup") + if err != nil { + return nil, fmt.Errorf("Failed to parse cgroup information: %v", err) + } + + allMap := make(map[string]bool) + for s := range allSubsystems { + allMap[s] = false + } + + mps := make(map[string]string) + for _, mi := range mounts { + for _, opt := range strings.Split(mi.VFSOptions, ",") { + seen, known := allMap[opt] + if known && !seen { + allMap[opt] = true + mps[strings.TrimPrefix(opt, "name=")] = mi.Mountpoint + } + } + if len(mps) >= len(allMap) { + break + } + } + return mps, nil +} + +type infoCollector func(info *SysInfo) + +// WithCgroup2GroupPath specifies the cgroup v2 group path to inspect availability +// of the controllers. +// +// WithCgroup2GroupPath is expected to be used for rootless mode with systemd driver. +// +// e.g. g = "/user.slice/user-1000.slice/user@1000.service" +func WithCgroup2GroupPath(g string) Opt { + return func(o *SysInfo) { + if p := path.Clean(g); p != "" { + o.cg2GroupPath = p + } + } +} + +// New returns a new SysInfo, using the filesystem to detect which features +// the kernel supports. +func New(options ...Opt) *SysInfo { + if cgroups.Mode() == cgroups.Unified { + return newV2(options...) + } + return newV1() +} + +func newV1() *SysInfo { + var ( + err error + sysInfo = &SysInfo{} + ) + + ops := []infoCollector{ + applyNetworkingInfo, + applyAppArmorInfo, + applySeccompInfo, + applyCgroupNsInfo, + } + + sysInfo.cgMounts, err = findCgroupV1Mountpoints() + if err != nil { + log.G(context.TODO()).Warn(err) + } else { + ops = append(ops, + applyMemoryCgroupInfo, + applyCPUCgroupInfo, + applyBlkioCgroupInfo, + applyCPUSetCgroupInfo, + applyPIDSCgroupInfo, + applyDevicesCgroupInfo, + ) + } + + for _, o := range ops { + o(sysInfo) + } + return sysInfo +} + +// applyMemoryCgroupInfo adds the memory cgroup controller information to the info. +func applyMemoryCgroupInfo(info *SysInfo) { + mountPoint, ok := info.cgMounts["memory"] + if !ok { + info.Warnings = append(info.Warnings, "Your kernel does not support cgroup memory limit") + return + } + info.MemoryLimit = ok + + info.SwapLimit = cgroupEnabled(mountPoint, "memory.memsw.limit_in_bytes") + if !info.SwapLimit { + info.Warnings = append(info.Warnings, "Your kernel does not support swap memory limit") + } + info.MemoryReservation = cgroupEnabled(mountPoint, "memory.soft_limit_in_bytes") + if !info.MemoryReservation { + info.Warnings = append(info.Warnings, "Your kernel does not support memory reservation") + } + info.OomKillDisable = cgroupEnabled(mountPoint, "memory.oom_control") + if !info.OomKillDisable { + info.Warnings = append(info.Warnings, "Your kernel does not support oom control") + } + info.MemorySwappiness = cgroupEnabled(mountPoint, "memory.swappiness") + if !info.MemorySwappiness { + info.Warnings = append(info.Warnings, "Your kernel does not support memory swappiness") + } + + // Option is deprecated, but still accepted on API < v1.42 with cgroups v1, + // so setting the field to allow feature detection. + info.KernelMemory = cgroupEnabled(mountPoint, "memory.kmem.limit_in_bytes") + + // Option is deprecated in runc, but still accepted in our API, so setting + // the field to allow feature detection, but don't warn if it's missing, to + // make the daemon logs a bit less noisy. + info.KernelMemoryTCP = cgroupEnabled(mountPoint, "memory.kmem.tcp.limit_in_bytes") +} + +// applyCPUCgroupInfo adds the cpu cgroup controller information to the info. +func applyCPUCgroupInfo(info *SysInfo) { + mountPoint, ok := info.cgMounts["cpu"] + if !ok { + info.Warnings = append(info.Warnings, "Unable to find cpu cgroup in mounts") + return + } + + info.CPUShares = cgroupEnabled(mountPoint, "cpu.shares") + if !info.CPUShares { + info.Warnings = append(info.Warnings, "Your kernel does not support CPU shares") + } + + info.CPUCfs = cgroupEnabled(mountPoint, "cpu.cfs_quota_us") + if !info.CPUCfs { + info.Warnings = append(info.Warnings, "Your kernel does not support CPU CFS scheduler") + } + + info.CPURealtime = cgroupEnabled(mountPoint, "cpu.rt_period_us") + if !info.CPURealtime { + info.Warnings = append(info.Warnings, "Your kernel does not support CPU realtime scheduler") + } +} + +// applyBlkioCgroupInfo adds the blkio cgroup controller information to the info. +func applyBlkioCgroupInfo(info *SysInfo) { + mountPoint, ok := info.cgMounts["blkio"] + if !ok { + info.Warnings = append(info.Warnings, "Unable to find blkio cgroup in mounts") + return + } + + info.BlkioWeight = cgroupEnabled(mountPoint, "blkio.weight") + if !info.BlkioWeight { + info.Warnings = append(info.Warnings, "Your kernel does not support cgroup blkio weight") + } + + info.BlkioWeightDevice = cgroupEnabled(mountPoint, "blkio.weight_device") + if !info.BlkioWeightDevice { + info.Warnings = append(info.Warnings, "Your kernel does not support cgroup blkio weight_device") + } + + info.BlkioReadBpsDevice = cgroupEnabled(mountPoint, "blkio.throttle.read_bps_device") + if !info.BlkioReadBpsDevice { + info.Warnings = append(info.Warnings, "Your kernel does not support cgroup blkio throttle.read_bps_device") + } + + info.BlkioWriteBpsDevice = cgroupEnabled(mountPoint, "blkio.throttle.write_bps_device") + if !info.BlkioWriteBpsDevice { + info.Warnings = append(info.Warnings, "Your kernel does not support cgroup blkio throttle.write_bps_device") + } + info.BlkioReadIOpsDevice = cgroupEnabled(mountPoint, "blkio.throttle.read_iops_device") + if !info.BlkioReadIOpsDevice { + info.Warnings = append(info.Warnings, "Your kernel does not support cgroup blkio throttle.read_iops_device") + } + + info.BlkioWriteIOpsDevice = cgroupEnabled(mountPoint, "blkio.throttle.write_iops_device") + if !info.BlkioWriteIOpsDevice { + info.Warnings = append(info.Warnings, "Your kernel does not support cgroup blkio throttle.write_iops_device") + } +} + +// applyCPUSetCgroupInfo adds the cpuset cgroup controller information to the info. +func applyCPUSetCgroupInfo(info *SysInfo) { + mountPoint, ok := info.cgMounts["cpuset"] + if !ok { + info.Warnings = append(info.Warnings, "Unable to find cpuset cgroup in mounts") + return + } + info.Cpuset = ok + + var err error + + cpus, err := os.ReadFile(path.Join(mountPoint, "cpuset.cpus")) + if err != nil { + return + } + info.Cpus = strings.TrimSpace(string(cpus)) + + mems, err := os.ReadFile(path.Join(mountPoint, "cpuset.mems")) + if err != nil { + return + } + info.Mems = strings.TrimSpace(string(mems)) +} + +// applyPIDSCgroupInfo adds whether the pids cgroup controller is available to the info. +func applyPIDSCgroupInfo(info *SysInfo) { + _, ok := info.cgMounts["pids"] + if !ok { + info.Warnings = append(info.Warnings, "Unable to find pids cgroup in mounts") + return + } + info.PidsLimit = true +} + +// applyDevicesCgroupInfo adds whether the devices cgroup controller is available to the info. +func applyDevicesCgroupInfo(info *SysInfo) { + _, ok := info.cgMounts["devices"] + info.CgroupDevicesEnabled = ok +} + +// applyNetworkingInfo adds networking information to the info. +func applyNetworkingInfo(info *SysInfo) { + info.IPv4ForwardingDisabled = !readProcBool("/proc/sys/net/ipv4/ip_forward") + info.BridgeNFCallIPTablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-iptables") + info.BridgeNFCallIP6TablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-ip6tables") +} + +// applyAppArmorInfo adds whether AppArmor is enabled to the info. +func applyAppArmorInfo(info *SysInfo) { + if _, err := os.Stat("/sys/kernel/security/apparmor"); !os.IsNotExist(err) { + if _, err := os.ReadFile("/sys/kernel/security/apparmor/profiles"); err == nil { + info.AppArmor = true + } + } +} + +// applyCgroupNsInfo adds whether cgroupns is enabled to the info. +func applyCgroupNsInfo(info *SysInfo) { + if _, err := os.Stat("/proc/self/ns/cgroup"); !os.IsNotExist(err) { + info.CgroupNamespaces = true + } +} + +// applySeccompInfo checks if Seccomp is supported, via CONFIG_SECCOMP. +func applySeccompInfo(info *SysInfo) { + info.Seccomp = seccomp.IsEnabled() +} + +func cgroupEnabled(mountPoint, name string) bool { + _, err := os.Stat(path.Join(mountPoint, name)) + return err == nil +} + +func readProcBool(path string) bool { + val, err := os.ReadFile(path) + if err != nil { + return false + } + return strings.TrimSpace(string(val)) == "1" +} diff --git a/pkg/sysinfo/sysinfo_linux_test.go b/pkg/sysinfo/sysinfo_linux_test.go new file mode 100644 index 00000000000..2f503d8f81b --- /dev/null +++ b/pkg/sysinfo/sysinfo_linux_test.go @@ -0,0 +1,123 @@ +package sysinfo // import "github.com/docker/docker/pkg/sysinfo" + +import ( + "os" + "path" + "path/filepath" + "testing" + + "github.com/containerd/nerdctl/v2/pkg/rootlessutil" + "golang.org/x/sys/unix" + "gotest.tools/v3/assert" +) + +func TestReadProcBool(t *testing.T) { + tmpDir, err := os.MkdirTemp("", "test-sysinfo-proc") + assert.NilError(t, err) + defer os.RemoveAll(tmpDir) + + procFile := filepath.Join(tmpDir, "read-proc-bool") + err = os.WriteFile(procFile, []byte("1"), 0o644) + assert.NilError(t, err) + + if !readProcBool(procFile) { + t.Fatal("expected proc bool to be true, got false") + } + + if err := os.WriteFile(procFile, []byte("0"), 0o644); err != nil { + t.Fatal(err) + } + if readProcBool(procFile) { + t.Fatal("expected proc bool to be false, got true") + } + + if readProcBool(path.Join(tmpDir, "no-exist")) { + t.Fatal("should be false for non-existent entry") + } +} + +func TestCgroupEnabled(t *testing.T) { + cgroupDir, err := os.MkdirTemp("", "cgroup-test") + assert.NilError(t, err) + defer os.RemoveAll(cgroupDir) + + if cgroupEnabled(cgroupDir, "test") { + t.Fatal("cgroupEnabled should be false") + } + + err = os.WriteFile(path.Join(cgroupDir, "test"), []byte{}, 0o644) + assert.NilError(t, err) + + if !cgroupEnabled(cgroupDir, "test") { + t.Fatal("cgroupEnabled should be true") + } +} + +func TestNew(t *testing.T) { + sysInfo := New() + assert.Assert(t, sysInfo != nil) + checkSysInfo(t, sysInfo) +} + +func checkSysInfo(t *testing.T, sysInfo *SysInfo) { + // Check if Seccomp is supported, via CONFIG_SECCOMP.then sysInfo.Seccomp must be TRUE , else FALSE + if err := unix.Prctl(unix.PR_GET_SECCOMP, 0, 0, 0, 0); err != unix.EINVAL { + // Make sure the kernel has CONFIG_SECCOMP_FILTER. + if err := unix.Prctl(unix.PR_SET_SECCOMP, unix.SECCOMP_MODE_FILTER, 0, 0, 0); err != unix.EINVAL { + assert.Assert(t, sysInfo.Seccomp) + } + } else { + assert.Assert(t, !sysInfo.Seccomp) + } +} + +func TestNewAppArmorEnabled(t *testing.T) { + // Check if AppArmor is supported. then it must be TRUE , else FALSE + if _, err := os.Stat("/sys/kernel/security/apparmor"); err != nil { + t.Skip("AppArmor Must be Enabled") + } + + // FIXME: rootless is not allowed to read the profile + if rootlessutil.IsRootless() { + t.Skip("containerd v2 aftermath: test skipped for rootless") + } + sysInfo := New() + assert.Assert(t, sysInfo.AppArmor) +} + +func TestNewAppArmorDisabled(t *testing.T) { + // Check if AppArmor is supported. then it must be TRUE , else FALSE + if _, err := os.Stat("/sys/kernel/security/apparmor"); !os.IsNotExist(err) { + t.Skip("AppArmor Must be Disabled") + } + + sysInfo := New() + assert.Assert(t, !sysInfo.AppArmor) +} + +func TestNewCgroupNamespacesEnabled(t *testing.T) { + // If cgroup namespaces are supported in the kernel, then sysInfo.CgroupNamespaces should be TRUE + if _, err := os.Stat("/proc/self/ns/cgroup"); err != nil { + t.Skip("cgroup namespaces must be enabled") + } + + sysInfo := New() + assert.Assert(t, sysInfo.CgroupNamespaces) +} + +func TestNewCgroupNamespacesDisabled(t *testing.T) { + // If cgroup namespaces are *not* supported in the kernel, then sysInfo.CgroupNamespaces should be FALSE + if _, err := os.Stat("/proc/self/ns/cgroup"); !os.IsNotExist(err) { + t.Skip("cgroup namespaces must be disabled") + } + + sysInfo := New() + assert.Assert(t, !sysInfo.CgroupNamespaces) +} + +func TestNumCPU(t *testing.T) { + cpuNumbers := NumCPU() + if cpuNumbers <= 0 { + t.Fatal("CPU returned must be greater than zero") + } +} diff --git a/pkg/sysinfo/sysinfo_other.go b/pkg/sysinfo/sysinfo_other.go new file mode 100644 index 00000000000..37742db7817 --- /dev/null +++ b/pkg/sysinfo/sysinfo_other.go @@ -0,0 +1,8 @@ +//go:build !linux + +package sysinfo // import "github.com/docker/docker/pkg/sysinfo" + +// New returns an empty SysInfo for non linux for now. +func New(options ...Opt) *SysInfo { + return &SysInfo{} +} diff --git a/pkg/sysinfo/sysinfo_test.go b/pkg/sysinfo/sysinfo_test.go new file mode 100644 index 00000000000..6a118b63c87 --- /dev/null +++ b/pkg/sysinfo/sysinfo_test.go @@ -0,0 +1,26 @@ +package sysinfo // import "github.com/docker/docker/pkg/sysinfo" + +import "testing" + +func TestIsCpusetListAvailable(t *testing.T) { + cases := []struct { + provided string + available string + res bool + err bool + }{ + {"1", "0-4", true, false}, + {"01,3", "0-4", true, false}, + {"", "0-7", true, false}, + {"1--42", "0-7", false, true}, + {"1-42", "00-1,8,,9", false, true}, + {"1,41-42", "43,45", false, false}, + {"0-3", "", false, false}, + } + for _, c := range cases { + r, err := isCpusetListAvailable(c.provided, c.available) + if (c.err && err == nil) && r != c.res { + t.Fatalf("Expected pair: %v, %v for %s, %s. Got %v, %v instead", c.res, c.err, c.provided, c.available, (c.err && err == nil), r) + } + } +} diff --git a/pkg/taskutil/taskutil.go b/pkg/taskutil/taskutil.go index 101452f8b0e..02cc0221ccb 100644 --- a/pkg/taskutil/taskutil.go +++ b/pkg/taskutil/taskutil.go @@ -28,8 +28,8 @@ import ( "github.com/Masterminds/semver/v3" "github.com/containerd/console" - "github.com/containerd/containerd" - "github.com/containerd/containerd/cio" + containerd "github.com/containerd/containerd/v2/client" + "github.com/containerd/containerd/v2/pkg/cio" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/cioutil" "github.com/containerd/nerdctl/v2/pkg/consoleutil" diff --git a/pkg/testutil/nettestutil/nettestutil.go b/pkg/testutil/nettestutil/nettestutil.go index be9d14fb8f3..4937b8acc21 100644 --- a/pkg/testutil/nettestutil/nettestutil.go +++ b/pkg/testutil/nettestutil/nettestutil.go @@ -24,7 +24,7 @@ import ( "net/http" "time" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" ) func HTTPGet(urlStr string, attempts int, insecure bool) (*http.Response, error) { diff --git a/pkg/testutil/testutil.go b/pkg/testutil/testutil.go index d2612271285..b2913e574c6 100644 --- a/pkg/testutil/testutil.go +++ b/pkg/testutil/testutil.go @@ -31,7 +31,7 @@ import ( "time" "github.com/Masterminds/semver/v3" - "github.com/containerd/containerd/defaults" + "github.com/containerd/containerd/v2/defaults" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/buildkitutil" "github.com/containerd/nerdctl/v2/pkg/imgutil"