diff --git a/Dockerfile b/Dockerfile index 9746b272409..dca67237b11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -319,7 +319,7 @@ RUN curl -o nydus-static.tgz -fsSL --proto '=https' --tlsv1.2 "https://github.co mv nydus-static/nydus-image nydus-static/nydusd nydus-static/nydusify /usr/bin/ && \ rm nydus-static.tgz CMD ["gotestsum", "--format=testname", "--rerun-fails=2", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \ - "--", "-timeout=30m", "-args", "-test.kill-daemon"] + "--", "-timeout=60m", "-args", "-test.kill-daemon"] FROM test-integration AS test-integration-rootless # Install SSH for creating systemd user session. @@ -345,7 +345,7 @@ COPY ./Dockerfile.d/test-integration-rootless.sh / CMD ["/test-integration-rootless.sh", \ "gotestsum", "--format=testname", "--rerun-fails=2", "--raw-command", \ "--", "/usr/local/go/bin/go", "tool", "test2json", "-t", "-p", "github.com/containerd/nerdctl/v2/cmd/nerdctl", \ - "/usr/local/bin/nerdctl.test", "-test.v", "-test.timeout=30m", "-test.kill-daemon"] + "/usr/local/bin/nerdctl.test", "-test.v", "-test.timeout=60m", "-test.kill-daemon"] # test for CONTAINERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns FROM test-integration-rootless AS test-integration-rootless-port-slirp4netns @@ -354,6 +354,6 @@ RUN chown -R rootless:rootless /home/rootless/.config FROM test-integration AS test-integration-ipv6 CMD ["gotestsum", "--format=testname", "--rerun-fails=2", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \ - "--", "-timeout=30m", "-args", "-test.kill-daemon", "-test.ipv6"] + "--", "-timeout=60m", "-args", "-test.kill-daemon", "-test.ipv6"] FROM base AS demo diff --git a/cmd/nerdctl/apparmor_inspect_linux.go b/cmd/nerdctl/apparmor_inspect_linux.go index 18a4e3afd00..681826bf82e 100644 --- a/cmd/nerdctl/apparmor_inspect_linux.go +++ b/cmd/nerdctl/apparmor_inspect_linux.go @@ -19,11 +19,11 @@ package main import ( "fmt" - "github.com/containerd/nerdctl/v2/pkg/api/types" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/apparmor" "github.com/containerd/nerdctl/v2/pkg/defaults" - "github.com/spf13/cobra" ) func newApparmorInspectCommand() *cobra.Command { diff --git a/cmd/nerdctl/apparmor_list_linux.go b/cmd/nerdctl/apparmor_list_linux.go index 99cc8eb5aa6..e650e3ea21a 100644 --- a/cmd/nerdctl/apparmor_list_linux.go +++ b/cmd/nerdctl/apparmor_list_linux.go @@ -17,9 +17,10 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/apparmor" - "github.com/spf13/cobra" ) func newApparmorLsCommand() *cobra.Command { diff --git a/cmd/nerdctl/apparmor_load_linux.go b/cmd/nerdctl/apparmor_load_linux.go index a7e25c3f71e..0c04ae47783 100644 --- a/cmd/nerdctl/apparmor_load_linux.go +++ b/cmd/nerdctl/apparmor_load_linux.go @@ -19,9 +19,10 @@ package main import ( "fmt" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/cmd/apparmor" "github.com/containerd/nerdctl/v2/pkg/defaults" - "github.com/spf13/cobra" ) func newApparmorLoadCommand() *cobra.Command { diff --git a/cmd/nerdctl/apparmor_unload_linux.go b/cmd/nerdctl/apparmor_unload_linux.go index 1fb5c840c4a..8ab8e1bf2c6 100644 --- a/cmd/nerdctl/apparmor_unload_linux.go +++ b/cmd/nerdctl/apparmor_unload_linux.go @@ -19,9 +19,10 @@ package main import ( "fmt" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/cmd/apparmor" "github.com/containerd/nerdctl/v2/pkg/defaults" - "github.com/spf13/cobra" ) func newApparmorUnloadCommand() *cobra.Command { diff --git a/cmd/nerdctl/builder.go b/cmd/nerdctl/builder.go index 71a8b5a42de..1ae4d230c3b 100644 --- a/cmd/nerdctl/builder.go +++ b/cmd/nerdctl/builder.go @@ -22,9 +22,10 @@ import ( "os/exec" "strings" + "github.com/spf13/cobra" + "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/buildkitutil" - "github.com/spf13/cobra" ) func newBuilderCommand() *cobra.Command { diff --git a/cmd/nerdctl/builder_build.go b/cmd/nerdctl/builder_build.go index 0fa319a1eb6..46e04ed00b4 100644 --- a/cmd/nerdctl/builder_build.go +++ b/cmd/nerdctl/builder_build.go @@ -23,13 +23,13 @@ import ( "strconv" "strings" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/buildkitutil" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/builder" "github.com/containerd/nerdctl/v2/pkg/strutil" - - "github.com/spf13/cobra" ) func newBuildCommand() *cobra.Command { diff --git a/cmd/nerdctl/completion.go b/cmd/nerdctl/completion.go index ebd8d47c8bd..f36bc7b1ba7 100644 --- a/cmd/nerdctl/completion.go +++ b/cmd/nerdctl/completion.go @@ -20,11 +20,12 @@ import ( "context" "time" - "github.com/containerd/containerd" + "github.com/spf13/cobra" + + 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" - "github.com/spf13/cobra" ) func shellCompleteImageNames(cmd *cobra.Command) ([]string, cobra.ShellCompDirective) { diff --git a/cmd/nerdctl/completion_linux.go b/cmd/nerdctl/completion_linux.go index 52baa8b974a..12dd8297b3e 100644 --- a/cmd/nerdctl/completion_linux.go +++ b/cmd/nerdctl/completion_linux.go @@ -17,8 +17,9 @@ package main import ( - "github.com/containerd/nerdctl/v2/pkg/apparmorutil" "github.com/spf13/cobra" + + "github.com/containerd/nerdctl/v2/pkg/apparmorutil" ) func shellCompleteApparmorProfiles(cmd *cobra.Command) ([]string, cobra.ShellCompDirective) { diff --git a/cmd/nerdctl/compose.go b/cmd/nerdctl/compose.go index c64e719d4db..927f2024dd3 100644 --- a/cmd/nerdctl/compose.go +++ b/cmd/nerdctl/compose.go @@ -17,8 +17,9 @@ package main import ( - "github.com/containerd/nerdctl/v2/pkg/composer" "github.com/spf13/cobra" + + "github.com/containerd/nerdctl/v2/pkg/composer" ) func newComposeCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_build.go b/cmd/nerdctl/compose_build.go index 9a001af2c57..d607d17b2f4 100644 --- a/cmd/nerdctl/compose_build.go +++ b/cmd/nerdctl/compose_build.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposeBuildCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_config.go b/cmd/nerdctl/compose_config.go index 5a2b0be9820..c920c77f441 100644 --- a/cmd/nerdctl/compose_config.go +++ b/cmd/nerdctl/compose_config.go @@ -19,10 +19,11 @@ package main import ( "fmt" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposeConfigCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_create.go b/cmd/nerdctl/compose_create.go index 14c757aaab8..e420984e933 100644 --- a/cmd/nerdctl/compose_create.go +++ b/cmd/nerdctl/compose_create.go @@ -19,10 +19,11 @@ package main import ( "errors" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposeCreateCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_down.go b/cmd/nerdctl/compose_down.go index 19a5fe52bd6..6bcc152963d 100644 --- a/cmd/nerdctl/compose_down.go +++ b/cmd/nerdctl/compose_down.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposeDownCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_exec.go b/cmd/nerdctl/compose_exec.go index dee9ae91612..f8f4019bc42 100644 --- a/cmd/nerdctl/compose_exec.go +++ b/cmd/nerdctl/compose_exec.go @@ -19,10 +19,11 @@ package main import ( "errors" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposeExecCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_images.go b/cmd/nerdctl/compose_images.go index 80ef81855eb..45d66a15b8e 100644 --- a/cmd/nerdctl/compose_images.go +++ b/cmd/nerdctl/compose_images.go @@ -22,17 +22,18 @@ import ( "strings" "text/tabwriter" - "github.com/containerd/containerd" - "github.com/containerd/containerd/pkg/progress" - "github.com/containerd/containerd/snapshots" + "github.com/spf13/cobra" + "golang.org/x/sync/errgroup" + + 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" "github.com/containerd/nerdctl/v2/pkg/imgutil" "github.com/containerd/nerdctl/v2/pkg/labels" "github.com/containerd/nerdctl/v2/pkg/strutil" - "github.com/spf13/cobra" - "golang.org/x/sync/errgroup" ) func newComposeImagesCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_kill.go b/cmd/nerdctl/compose_kill.go index 5a7cee00917..f6d6a1d6352 100644 --- a/cmd/nerdctl/compose_kill.go +++ b/cmd/nerdctl/compose_kill.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposeKillCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_logs.go b/cmd/nerdctl/compose_logs.go index 46bd2df7203..79af0310b6d 100644 --- a/cmd/nerdctl/compose_logs.go +++ b/cmd/nerdctl/compose_logs.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposeLogsCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_pause.go b/cmd/nerdctl/compose_pause.go index 7cf24cfb78b..b280d5cf950 100644 --- a/cmd/nerdctl/compose_pause.go +++ b/cmd/nerdctl/compose_pause.go @@ -17,9 +17,10 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" - "github.com/spf13/cobra" ) func newComposePauseCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_port.go b/cmd/nerdctl/compose_port.go index 2156bd917e4..95035e833dd 100644 --- a/cmd/nerdctl/compose_port.go +++ b/cmd/nerdctl/compose_port.go @@ -20,10 +20,11 @@ import ( "fmt" "strconv" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposePortCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_ps.go b/cmd/nerdctl/compose_ps.go index aa4fdd20268..ad43b5c0768 100644 --- a/cmd/nerdctl/compose_ps.go +++ b/cmd/nerdctl/compose_ps.go @@ -23,8 +23,11 @@ import ( "text/tabwriter" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/runtime/restart" + "github.com/spf13/cobra" + "golang.org/x/sync/errgroup" + + 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" @@ -34,8 +37,6 @@ import ( "github.com/containerd/nerdctl/v2/pkg/formatter" "github.com/containerd/nerdctl/v2/pkg/labels" "github.com/containerd/nerdctl/v2/pkg/portutil" - "github.com/spf13/cobra" - "golang.org/x/sync/errgroup" ) func newComposePsCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_pull.go b/cmd/nerdctl/compose_pull.go index babe2e65752..738c0b955e9 100644 --- a/cmd/nerdctl/compose_pull.go +++ b/cmd/nerdctl/compose_pull.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposePullCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_restart.go b/cmd/nerdctl/compose_restart.go index 46ba6d31887..a68f6e52408 100644 --- a/cmd/nerdctl/compose_restart.go +++ b/cmd/nerdctl/compose_restart.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposeRestartCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_run.go b/cmd/nerdctl/compose_run.go index 0cfe5cfd535..122e6be23bf 100644 --- a/cmd/nerdctl/compose_run.go +++ b/cmd/nerdctl/compose_run.go @@ -20,10 +20,11 @@ import ( "errors" "fmt" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposeRunCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_start.go b/cmd/nerdctl/compose_start.go index f5e0682085e..509ae1a1e05 100644 --- a/cmd/nerdctl/compose_start.go +++ b/cmd/nerdctl/compose_start.go @@ -21,14 +21,15 @@ import ( "fmt" "os" - "github.com/containerd/containerd" + "github.com/spf13/cobra" + "golang.org/x/sync/errgroup" + + 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" "github.com/containerd/nerdctl/v2/pkg/labels" - "github.com/spf13/cobra" - "golang.org/x/sync/errgroup" ) func newComposeStartCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_stop.go b/cmd/nerdctl/compose_stop.go index ab6053d1d5a..07bd789178e 100644 --- a/cmd/nerdctl/compose_stop.go +++ b/cmd/nerdctl/compose_stop.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/compose" "github.com/containerd/nerdctl/v2/pkg/composer" - "github.com/spf13/cobra" ) func newComposeStopCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_top.go b/cmd/nerdctl/compose_top.go index 52ea6a71800..70cd9ac1f54 100644 --- a/cmd/nerdctl/compose_top.go +++ b/cmd/nerdctl/compose_top.go @@ -19,14 +19,15 @@ package main import ( "fmt" - "github.com/containerd/containerd" + "github.com/spf13/cobra" + + 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" "github.com/containerd/nerdctl/v2/pkg/cmd/container" "github.com/containerd/nerdctl/v2/pkg/containerutil" "github.com/containerd/nerdctl/v2/pkg/labels" - "github.com/spf13/cobra" ) func newComposeTopCommand() *cobra.Command { diff --git a/cmd/nerdctl/compose_up_linux_test.go b/cmd/nerdctl/compose_up_linux_test.go index d060bada8c6..94fccd05a02 100644 --- a/cmd/nerdctl/compose_up_linux_test.go +++ b/cmd/nerdctl/compose_up_linux_test.go @@ -23,16 +23,15 @@ import ( "testing" "time" + "github.com/docker/go-connections/nat" + "gotest.tools/v3/assert" + "gotest.tools/v3/icmd" + "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/composer/serviceparser" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" - "github.com/docker/go-connections/nat" - "github.com/containerd/nerdctl/v2/pkg/testutil" "github.com/containerd/nerdctl/v2/pkg/testutil/nettestutil" - - "gotest.tools/v3/assert" - "gotest.tools/v3/icmd" ) func TestComposeUp(t *testing.T) { 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_commit.go b/cmd/nerdctl/container_commit.go index 2b56c1de641..96c79cbc66d 100644 --- a/cmd/nerdctl/container_commit.go +++ b/cmd/nerdctl/container_commit.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" - "github.com/spf13/cobra" ) func newCommitCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_cp_linux.go b/cmd/nerdctl/container_cp_linux.go index 9f38c394af7..3a2c2aa84e1 100644 --- a/cmd/nerdctl/container_cp_linux.go +++ b/cmd/nerdctl/container_cp_linux.go @@ -19,11 +19,12 @@ package main import ( "fmt" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" - "github.com/spf13/cobra" ) func newCpCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_diff.go b/cmd/nerdctl/container_diff.go index 7731327d3e2..00f228f9fc9 100644 --- a/cmd/nerdctl/container_diff.go +++ b/cmd/nerdctl/container_diff.go @@ -23,9 +23,12 @@ import ( "path/filepath" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/leases" - "github.com/containerd/containerd/mount" + "github.com/opencontainers/image-spec/identity" + "github.com/spf13/cobra" + + 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" @@ -35,8 +38,6 @@ import ( "github.com/containerd/nerdctl/v2/pkg/imgutil" "github.com/containerd/nerdctl/v2/pkg/labels" "github.com/containerd/platforms" - "github.com/opencontainers/image-spec/identity" - "github.com/spf13/cobra" ) func newDiffCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_exec.go b/cmd/nerdctl/container_exec.go index 751c3915190..7c879e288a8 100644 --- a/cmd/nerdctl/container_exec.go +++ b/cmd/nerdctl/container_exec.go @@ -19,11 +19,12 @@ package main import ( "errors" - "github.com/containerd/containerd" + "github.com/spf13/cobra" + + 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" - "github.com/spf13/cobra" ) func newExecCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_inspect.go b/cmd/nerdctl/container_inspect.go index cd3c01871df..e178724617e 100644 --- a/cmd/nerdctl/container_inspect.go +++ b/cmd/nerdctl/container_inspect.go @@ -19,11 +19,11 @@ package main import ( "fmt" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" - - "github.com/spf13/cobra" ) func newContainerInspectCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_inspect_linux_test.go b/cmd/nerdctl/container_inspect_linux_test.go index 58ceb359d74..a1aca0d1a3c 100644 --- a/cmd/nerdctl/container_inspect_linux_test.go +++ b/cmd/nerdctl/container_inspect_linux_test.go @@ -21,11 +21,12 @@ import ( "strings" "testing" + "github.com/docker/go-connections/nat" + "gotest.tools/v3/assert" + "github.com/containerd/nerdctl/v2/pkg/inspecttypes/dockercompat" "github.com/containerd/nerdctl/v2/pkg/labels" "github.com/containerd/nerdctl/v2/pkg/testutil" - "github.com/docker/go-connections/nat" - "gotest.tools/v3/assert" ) func TestContainerInspectContainsPortConfig(t *testing.T) { 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_list.go b/cmd/nerdctl/container_list.go index 549df18ca08..e66e7a6584e 100644 --- a/cmd/nerdctl/container_list.go +++ b/cmd/nerdctl/container_list.go @@ -24,12 +24,12 @@ import ( "text/tabwriter" "text/template" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" "github.com/containerd/nerdctl/v2/pkg/formatter" - - "github.com/spf13/cobra" ) func newPsCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_logs.go b/cmd/nerdctl/container_logs.go index 27e5dec0250..2e66c91e09e 100644 --- a/cmd/nerdctl/container_logs.go +++ b/cmd/nerdctl/container_logs.go @@ -20,10 +20,11 @@ import ( "fmt" "strconv" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" - "github.com/spf13/cobra" ) func newLogsCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_pause.go b/cmd/nerdctl/container_pause.go index bf8cf4f0107..f66f2a9753b 100644 --- a/cmd/nerdctl/container_pause.go +++ b/cmd/nerdctl/container_pause.go @@ -17,11 +17,12 @@ package main import ( - "github.com/containerd/containerd" + "github.com/spf13/cobra" + + 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" - "github.com/spf13/cobra" ) func newPauseCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_port.go b/cmd/nerdctl/container_port.go index 072df21ba25..df98022ad73 100644 --- a/cmd/nerdctl/container_port.go +++ b/cmd/nerdctl/container_port.go @@ -22,11 +22,11 @@ import ( "strconv" "strings" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/containerutil" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" - - "github.com/spf13/cobra" ) func newPortCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_prune.go b/cmd/nerdctl/container_prune.go index 1d1e19afa6d..fc2bdcc9457 100644 --- a/cmd/nerdctl/container_prune.go +++ b/cmd/nerdctl/container_prune.go @@ -20,10 +20,11 @@ import ( "fmt" "strings" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" - "github.com/spf13/cobra" ) func newContainerPruneCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_remove.go b/cmd/nerdctl/container_remove.go index 20588a32408..bdd415f836e 100644 --- a/cmd/nerdctl/container_remove.go +++ b/cmd/nerdctl/container_remove.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" - "github.com/spf13/cobra" ) func newRmCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_restart.go b/cmd/nerdctl/container_restart.go index 906c7ff6486..caf05341746 100644 --- a/cmd/nerdctl/container_restart.go +++ b/cmd/nerdctl/container_restart.go @@ -19,10 +19,11 @@ package main import ( "time" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" - "github.com/spf13/cobra" ) func newRestartCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_run_cgroup_linux_test.go b/cmd/nerdctl/container_run_cgroup_linux_test.go index 106060bf365..7f7e6c0d2f9 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_log_driver_syslog_test.go b/cmd/nerdctl/container_run_log_driver_syslog_test.go index ca0ea993e7c..7e836c61149 100644 --- a/cmd/nerdctl/container_run_log_driver_syslog_test.go +++ b/cmd/nerdctl/container_run_log_driver_syslog_test.go @@ -25,11 +25,12 @@ import ( "testing" "time" + syslog "github.com/yuchanns/srslog" + "github.com/containerd/nerdctl/v2/pkg/rootlessutil" "github.com/containerd/nerdctl/v2/pkg/testutil" "github.com/containerd/nerdctl/v2/pkg/testutil/testca" "github.com/containerd/nerdctl/v2/pkg/testutil/testsyslog" - syslog "github.com/yuchanns/srslog" ) func runSyslogTest(t *testing.T, networks []string, syslogFacilities map[string]syslog.Priority, fmtValidFuncs map[string]func(string, string, string, string, syslog.Priority, bool) error) { diff --git a/cmd/nerdctl/container_run_mount_linux_test.go b/cmd/nerdctl/container_run_mount_linux_test.go index ee8a8b6d14a..ea97047ec9c 100644 --- a/cmd/nerdctl/container_run_mount_linux_test.go +++ b/cmd/nerdctl/container_run_mount_linux_test.go @@ -23,11 +23,12 @@ import ( "strings" "testing" - "github.com/containerd/containerd/mount" - "github.com/containerd/nerdctl/v2/pkg/rootlessutil" - "github.com/containerd/nerdctl/v2/pkg/testutil" mobymount "github.com/moby/sys/mount" "gotest.tools/v3/assert" + + "github.com/containerd/containerd/v2/core/mount" + "github.com/containerd/nerdctl/v2/pkg/rootlessutil" + "github.com/containerd/nerdctl/v2/pkg/testutil" ) func TestRunVolume(t *testing.T) { diff --git a/cmd/nerdctl/container_run_network.go b/cmd/nerdctl/container_run_network.go index 64822221d4e..3e4444267d9 100644 --- a/cmd/nerdctl/container_run_network.go +++ b/cmd/nerdctl/container_run_network.go @@ -19,11 +19,12 @@ package main import ( "net" + "github.com/spf13/cobra" + gocni "github.com/containerd/go-cni" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/portutil" "github.com/containerd/nerdctl/v2/pkg/strutil" - "github.com/spf13/cobra" ) func loadNetworkFlags(cmd *cobra.Command) (types.NetworkOptions, error) { diff --git a/cmd/nerdctl/container_run_test.go b/cmd/nerdctl/container_run_test.go index 5138d0f0296..16ada61828d 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..9f39942e6f9 100644 --- a/cmd/nerdctl/container_stats.go +++ b/cmd/nerdctl/container_stats.go @@ -17,11 +17,12 @@ package main import ( - "github.com/containerd/containerd" + "github.com/spf13/cobra" + + 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" - "github.com/spf13/cobra" ) func newStatsCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_stop.go b/cmd/nerdctl/container_stop.go index 0398e36ae44..31f2751981c 100644 --- a/cmd/nerdctl/container_stop.go +++ b/cmd/nerdctl/container_stop.go @@ -19,11 +19,12 @@ package main import ( "time" - "github.com/containerd/containerd" + "github.com/spf13/cobra" + + 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" - "github.com/spf13/cobra" ) func newStopCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_top.go b/cmd/nerdctl/container_top.go index c51b23d7242..b5434dfd7c0 100644 --- a/cmd/nerdctl/container_top.go +++ b/cmd/nerdctl/container_top.go @@ -20,14 +20,14 @@ import ( "errors" "fmt" - "github.com/containerd/containerd" + "github.com/spf13/cobra" + + 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" "github.com/containerd/nerdctl/v2/pkg/infoutil" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" - - "github.com/spf13/cobra" ) func newTopCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_unpause.go b/cmd/nerdctl/container_unpause.go index 26909f790b2..190ea8e6ffe 100644 --- a/cmd/nerdctl/container_unpause.go +++ b/cmd/nerdctl/container_unpause.go @@ -17,12 +17,12 @@ package main import ( - "github.com/containerd/containerd" + "github.com/spf13/cobra" + + 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" - - "github.com/spf13/cobra" ) func newUnpauseCommand() *cobra.Command { diff --git a/cmd/nerdctl/container_update.go b/cmd/nerdctl/container_update.go index d52d12a908b..6de1edcaa1a 100644 --- a/cmd/nerdctl/container_update.go +++ b/cmd/nerdctl/container_update.go @@ -23,8 +23,12 @@ import ( "fmt" "runtime" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" + "github.com/docker/go-units" + runtimespec "github.com/opencontainers/runtime-spec/specs-go" + "github.com/spf13/cobra" + + 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" @@ -34,9 +38,6 @@ import ( "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" "github.com/containerd/nerdctl/v2/pkg/infoutil" "github.com/containerd/typeurl/v2" - "github.com/docker/go-units" - runtimespec "github.com/opencontainers/runtime-spec/specs-go" - "github.com/spf13/cobra" ) type updateResourceOptions struct { diff --git a/cmd/nerdctl/container_wait.go b/cmd/nerdctl/container_wait.go index 98156c44175..e9e456f9d4d 100644 --- a/cmd/nerdctl/container_wait.go +++ b/cmd/nerdctl/container_wait.go @@ -17,11 +17,12 @@ package main import ( - "github.com/containerd/containerd" + "github.com/spf13/cobra" + + 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" - "github.com/spf13/cobra" ) func newWaitCommand() *cobra.Command { diff --git a/cmd/nerdctl/image_convert.go b/cmd/nerdctl/image_convert.go index 0b27e593d77..355a2e9737a 100644 --- a/cmd/nerdctl/image_convert.go +++ b/cmd/nerdctl/image_convert.go @@ -19,10 +19,11 @@ package main import ( "compress/gzip" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/image" - "github.com/spf13/cobra" ) const imageConvertHelp = `Convert an image format. 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..6bb75a8ad77 100644 --- a/cmd/nerdctl/image_history.go +++ b/cmd/nerdctl/image_history.go @@ -28,15 +28,16 @@ import ( "text/template" "time" - "github.com/containerd/containerd" + "github.com/docker/go-units" + "github.com/opencontainers/image-spec/identity" + "github.com/spf13/cobra" + + 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" "github.com/containerd/nerdctl/v2/pkg/idutil/imagewalker" "github.com/containerd/nerdctl/v2/pkg/imgutil" - "github.com/docker/go-units" - "github.com/opencontainers/image-spec/identity" - "github.com/spf13/cobra" ) func newHistoryCommand() *cobra.Command { diff --git a/cmd/nerdctl/image_inspect.go b/cmd/nerdctl/image_inspect.go index 28a4ffe8a3f..9cc7fbdc81f 100644 --- a/cmd/nerdctl/image_inspect.go +++ b/cmd/nerdctl/image_inspect.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/image" - "github.com/spf13/cobra" ) func newImageInspectCommand() *cobra.Command { diff --git a/cmd/nerdctl/image_load.go b/cmd/nerdctl/image_load.go index 39c027d42fa..5e8e5a4228d 100644 --- a/cmd/nerdctl/image_load.go +++ b/cmd/nerdctl/image_load.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/image" - "github.com/spf13/cobra" ) func newLoadCommand() *cobra.Command { diff --git a/cmd/nerdctl/image_prune.go b/cmd/nerdctl/image_prune.go index 0f42f9e9828..56dd8797f1a 100644 --- a/cmd/nerdctl/image_prune.go +++ b/cmd/nerdctl/image_prune.go @@ -20,10 +20,11 @@ import ( "fmt" "strings" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/image" - "github.com/spf13/cobra" ) func newImagePruneCommand() *cobra.Command { diff --git a/cmd/nerdctl/image_pull.go b/cmd/nerdctl/image_pull.go index 36c4fa617a5..afe8717aa4c 100644 --- a/cmd/nerdctl/image_pull.go +++ b/cmd/nerdctl/image_pull.go @@ -17,12 +17,13 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/image" "github.com/containerd/nerdctl/v2/pkg/platformutil" "github.com/containerd/nerdctl/v2/pkg/strutil" - "github.com/spf13/cobra" ) func newPullCommand() *cobra.Command { diff --git a/cmd/nerdctl/image_push.go b/cmd/nerdctl/image_push.go index 132318b82ad..e04f8b5ef41 100644 --- a/cmd/nerdctl/image_push.go +++ b/cmd/nerdctl/image_push.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/image" - "github.com/spf13/cobra" ) const ( diff --git a/cmd/nerdctl/image_remove.go b/cmd/nerdctl/image_remove.go index 26dfdefe4c2..f61a39ac6cc 100644 --- a/cmd/nerdctl/image_remove.go +++ b/cmd/nerdctl/image_remove.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/image" - "github.com/spf13/cobra" ) func newRmiCommand() *cobra.Command { diff --git a/cmd/nerdctl/image_tag.go b/cmd/nerdctl/image_tag.go index b6eede91c90..abf96ab28cf 100644 --- a/cmd/nerdctl/image_tag.go +++ b/cmd/nerdctl/image_tag.go @@ -17,11 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/image" - - "github.com/spf13/cobra" ) func newTagCommand() *cobra.Command { diff --git a/cmd/nerdctl/inspect.go b/cmd/nerdctl/inspect.go index fa74d587786..150b8e7dfcd 100644 --- a/cmd/nerdctl/inspect.go +++ b/cmd/nerdctl/inspect.go @@ -20,14 +20,14 @@ import ( "context" "fmt" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/container" "github.com/containerd/nerdctl/v2/pkg/cmd/image" "github.com/containerd/nerdctl/v2/pkg/idutil/containerwalker" "github.com/containerd/nerdctl/v2/pkg/idutil/imagewalker" - - "github.com/spf13/cobra" ) func newInspectCommand() *cobra.Command { diff --git a/cmd/nerdctl/internal_oci_hook.go b/cmd/nerdctl/internal_oci_hook.go index bb76c19bb31..455b41daf7e 100644 --- a/cmd/nerdctl/internal_oci_hook.go +++ b/cmd/nerdctl/internal_oci_hook.go @@ -20,10 +20,10 @@ import ( "errors" "os" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/ocihook" - - "github.com/spf13/cobra" ) func newInternalOCIHookCommandCommand() *cobra.Command { diff --git a/cmd/nerdctl/ipfs_registry_serve.go b/cmd/nerdctl/ipfs_registry_serve.go index 67a120919bf..c02b32937a1 100644 --- a/cmd/nerdctl/ipfs_registry_serve.go +++ b/cmd/nerdctl/ipfs_registry_serve.go @@ -17,9 +17,10 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/ipfs" - "github.com/spf13/cobra" ) const ( diff --git a/cmd/nerdctl/login.go b/cmd/nerdctl/login.go index 9aea0501f88..d8d27415167 100644 --- a/cmd/nerdctl/login.go +++ b/cmd/nerdctl/login.go @@ -21,11 +21,11 @@ import ( "io" "strings" + "github.com/spf13/cobra" + "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/login" - - "github.com/spf13/cobra" ) func newLoginCommand() *cobra.Command { diff --git a/cmd/nerdctl/main.go b/cmd/nerdctl/main.go index 42e5eb7d925..4c5e00272fd 100644 --- a/cmd/nerdctl/main.go +++ b/cmd/nerdctl/main.go @@ -25,6 +25,11 @@ import ( "strings" "time" + "github.com/fatih/color" + "github.com/pelletier/go-toml/v2" + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/config" ncdefaults "github.com/containerd/nerdctl/v2/pkg/defaults" @@ -32,11 +37,6 @@ import ( "github.com/containerd/nerdctl/v2/pkg/logging" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" "github.com/containerd/nerdctl/v2/pkg/version" - "github.com/fatih/color" - "github.com/pelletier/go-toml/v2" - - "github.com/spf13/cobra" - "github.com/spf13/pflag" ) const ( diff --git a/cmd/nerdctl/main_linux.go b/cmd/nerdctl/main_linux.go index 5f1f5ae9355..1512c05a678 100644 --- a/cmd/nerdctl/main_linux.go +++ b/cmd/nerdctl/main_linux.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + ncdefaults "github.com/containerd/nerdctl/v2/pkg/defaults" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" "github.com/containerd/nerdctl/v2/pkg/strutil" - "github.com/spf13/cobra" ) func appNeedsRootlessParentMain(cmd *cobra.Command, args []string) bool { 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/main_unix.go b/cmd/nerdctl/main_unix.go index d804550fd19..2a768500566 100644 --- a/cmd/nerdctl/main_unix.go +++ b/cmd/nerdctl/main_unix.go @@ -19,11 +19,12 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/infoutil" "github.com/containerd/nerdctl/v2/pkg/rootlessutil" - "github.com/spf13/cobra" ) func shellCompleteNamespaceNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { diff --git a/cmd/nerdctl/namespace.go b/cmd/nerdctl/namespace.go index 20d188f3f57..ecd41989026 100644 --- a/cmd/nerdctl/namespace.go +++ b/cmd/nerdctl/namespace.go @@ -23,11 +23,12 @@ import ( "strings" "text/tabwriter" - "github.com/containerd/containerd/namespaces" + "github.com/spf13/cobra" + + "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" - "github.com/spf13/cobra" ) func newNamespaceCommand() *cobra.Command { diff --git a/cmd/nerdctl/namespace_create.go b/cmd/nerdctl/namespace_create.go index ae4b9e08b68..ee77ba54daf 100644 --- a/cmd/nerdctl/namespace_create.go +++ b/cmd/nerdctl/namespace_create.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/namespace" - "github.com/spf13/cobra" ) func newNamespaceCreateCommand() *cobra.Command { diff --git a/cmd/nerdctl/namespace_inspect.go b/cmd/nerdctl/namespace_inspect.go index 669d2002a60..5df289b35f1 100644 --- a/cmd/nerdctl/namespace_inspect.go +++ b/cmd/nerdctl/namespace_inspect.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/namespace" - "github.com/spf13/cobra" ) func newNamespaceInspectCommand() *cobra.Command { diff --git a/cmd/nerdctl/namespace_update.go b/cmd/nerdctl/namespace_update.go index aeabcf3aef7..782d43d7b4f 100644 --- a/cmd/nerdctl/namespace_update.go +++ b/cmd/nerdctl/namespace_update.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/namespace" - "github.com/spf13/cobra" ) func newNamespacelabelUpdateCommand() *cobra.Command { diff --git a/cmd/nerdctl/network_create.go b/cmd/nerdctl/network_create.go index c5fba0cac6b..9cb0191f35e 100644 --- a/cmd/nerdctl/network_create.go +++ b/cmd/nerdctl/network_create.go @@ -19,12 +19,12 @@ package main import ( "fmt" - "github.com/containerd/containerd/identifiers" + "github.com/spf13/cobra" + + "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" - - "github.com/spf13/cobra" ) func newNetworkCreateCommand() *cobra.Command { diff --git a/cmd/nerdctl/network_inspect.go b/cmd/nerdctl/network_inspect.go index f1cf21d1c9e..ad3bb6eaa91 100644 --- a/cmd/nerdctl/network_inspect.go +++ b/cmd/nerdctl/network_inspect.go @@ -17,9 +17,10 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/network" - "github.com/spf13/cobra" ) func newNetworkInspectCommand() *cobra.Command { diff --git a/cmd/nerdctl/network_list.go b/cmd/nerdctl/network_list.go index 0e98257f492..de0f35e5d54 100644 --- a/cmd/nerdctl/network_list.go +++ b/cmd/nerdctl/network_list.go @@ -17,9 +17,10 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/network" - "github.com/spf13/cobra" ) func newNetworkLsCommand() *cobra.Command { diff --git a/cmd/nerdctl/network_prune.go b/cmd/nerdctl/network_prune.go index 89e24ad2cf4..6e1430b22e7 100644 --- a/cmd/nerdctl/network_prune.go +++ b/cmd/nerdctl/network_prune.go @@ -20,10 +20,11 @@ import ( "fmt" "strings" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/network" - "github.com/spf13/cobra" ) var networkDriversToKeep = []string{"host", "none", DefaultNetworkDriver} diff --git a/cmd/nerdctl/network_remove_linux_test.go b/cmd/nerdctl/network_remove_linux_test.go index 9ac5267a46a..eed01050c36 100644 --- a/cmd/nerdctl/network_remove_linux_test.go +++ b/cmd/nerdctl/network_remove_linux_test.go @@ -19,10 +19,11 @@ package main import ( "testing" - "github.com/containerd/nerdctl/v2/pkg/rootlessutil" - "github.com/containerd/nerdctl/v2/pkg/testutil" "github.com/vishvananda/netlink" "gotest.tools/v3/assert" + + "github.com/containerd/nerdctl/v2/pkg/rootlessutil" + "github.com/containerd/nerdctl/v2/pkg/testutil" ) func TestNetworkRemove(t *testing.T) { diff --git a/cmd/nerdctl/system_events.go b/cmd/nerdctl/system_events.go index db41ab17dba..3754279cea2 100644 --- a/cmd/nerdctl/system_events.go +++ b/cmd/nerdctl/system_events.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/system" - "github.com/spf13/cobra" ) func newEventsCommand() *cobra.Command { diff --git a/cmd/nerdctl/system_prune.go b/cmd/nerdctl/system_prune.go index bfe1b8257d3..f521d223381 100644 --- a/cmd/nerdctl/system_prune.go +++ b/cmd/nerdctl/system_prune.go @@ -20,11 +20,12 @@ import ( "fmt" "strings" + "github.com/spf13/cobra" + "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/system" - "github.com/spf13/cobra" ) func newSystemPruneCommand() *cobra.Command { diff --git a/cmd/nerdctl/volume_create.go b/cmd/nerdctl/volume_create.go index c2c7f8ab760..55d50b7b3ec 100644 --- a/cmd/nerdctl/volume_create.go +++ b/cmd/nerdctl/volume_create.go @@ -19,11 +19,11 @@ package main import ( "fmt" + "github.com/spf13/cobra" + "github.com/containerd/errdefs" "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/volume" - - "github.com/spf13/cobra" ) func newVolumeCreateCommand() *cobra.Command { diff --git a/cmd/nerdctl/volume_inspect.go b/cmd/nerdctl/volume_inspect.go index 302b047f734..9c76242b7f3 100644 --- a/cmd/nerdctl/volume_inspect.go +++ b/cmd/nerdctl/volume_inspect.go @@ -17,9 +17,10 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/volume" - "github.com/spf13/cobra" ) func newVolumeInspectCommand() *cobra.Command { diff --git a/cmd/nerdctl/volume_list.go b/cmd/nerdctl/volume_list.go index 5f01f6c5146..b0a7f0783e1 100644 --- a/cmd/nerdctl/volume_list.go +++ b/cmd/nerdctl/volume_list.go @@ -17,11 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/cmd/volume" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/native" - - "github.com/spf13/cobra" ) func newVolumeLsCommand() *cobra.Command { diff --git a/cmd/nerdctl/volume_prune.go b/cmd/nerdctl/volume_prune.go index a6fa42392e9..1cc8d1168ce 100644 --- a/cmd/nerdctl/volume_prune.go +++ b/cmd/nerdctl/volume_prune.go @@ -20,10 +20,11 @@ import ( "fmt" "strings" + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/volume" - "github.com/spf13/cobra" ) func newVolumePruneCommand() *cobra.Command { diff --git a/cmd/nerdctl/volume_remove.go b/cmd/nerdctl/volume_remove.go index 0d237c10b6f..4acc340e172 100644 --- a/cmd/nerdctl/volume_remove.go +++ b/cmd/nerdctl/volume_remove.go @@ -17,10 +17,11 @@ package main import ( + "github.com/spf13/cobra" + "github.com/containerd/nerdctl/v2/pkg/api/types" "github.com/containerd/nerdctl/v2/pkg/clientutil" "github.com/containerd/nerdctl/v2/pkg/cmd/volume" - "github.com/spf13/cobra" ) func newVolumeRmCommand() *cobra.Command { diff --git a/go.mod b/go.mod index 900c9f75c38..ce4f2e100d2 100644 --- a/go.mod +++ b/go.mod @@ -1,28 +1,34 @@ module github.com/containerd/nerdctl/v2 -go 1.21.12 +go 1.22.0 + +// FIXME: +// github.com/docker/docker/pkg/sysinfo has been replaced by a fork kept under ./pkg2/sysinfo +// as Moby is not going to move to containerd v2 anytime soon or fix these transient dependencies. +// We should still move back to upstream in the future, and remove our copy. require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/Microsoft/go-winio v0.6.2 github.com/Microsoft/hcsshim v0.12.5 - github.com/compose-spec/compose-go/v2 v2.1.5 - github.com/containerd/accelerated-container-image v1.1.4 + github.com/compose-spec/compose-go/v2 v2.1.6 + github.com/containerd/accelerated-container-image v1.1.5-0.20240712041225-3c4dd559fed4 + 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.20 - 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/imgcrypt v1.2.0-rc1.0.20240709223013-f3769dc3e47f github.com/containerd/log v0.1.0 - github.com/containerd/nydus-snapshotter v0.14.0 + github.com/containerd/nydus-snapshotter v0.14.1-0.20240806063146-8fa319bfe9c5 github.com/containerd/platforms v0.2.1 - github.com/containerd/stargz-snapshotter v0.15.1 - github.com/containerd/stargz-snapshotter/estargz v0.15.1 - github.com/containerd/stargz-snapshotter/ipfs v0.15.1 + github.com/containerd/stargz-snapshotter v0.15.2-0.20240709063920-1dac5ef89319 + github.com/containerd/stargz-snapshotter/estargz v0.15.2-0.20240709063920-1dac5ef89319 + github.com/containerd/stargz-snapshotter/ipfs v0.15.2-0.20240709063920-1dac5ef89319 github.com/containerd/typeurl/v2 v2.2.0 github.com/containernetworking/cni v1.2.3 github.com/containernetworking/plugins v1.5.1 @@ -43,6 +49,7 @@ require ( github.com/mattn/go-isatty v0.0.20 github.com/mitchellh/mapstructure v1.5.0 github.com/moby/sys/mount v0.3.4 + github.com/moby/sys/mountinfo v0.7.2 github.com/moby/sys/signal v0.7.1 github.com/moby/term v0.5.0 github.com/muesli/cancelreader v0.2.2 @@ -58,31 +65,30 @@ 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.25.0 - golang.org/x/net v0.27.0 + golang.org/x/crypto v0.26.0 + golang.org/x/net v0.28.0 golang.org/x/sync v0.8.0 golang.org/x/sys v0.23.0 - golang.org/x/term v0.22.0 - golang.org/x/text v0.16.0 + golang.org/x/term v0.23.0 + golang.org/x/text v0.17.0 gopkg.in/yaml.v3 v3.0.1 gotest.tools/v3 v3.5.1 ) require ( - github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect + github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20231105174938-2b5cbb29f3e2 // 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.15.0 // indirect + github.com/cilium/ebpf v0.16.0 // indirect github.com/containerd/go-runc v1.1.0 // indirect + github.com/containerd/plugin v0.1.0 // indirect github.com/containerd/ttrpc v1.2.5 // indirect - github.com/containerd/typeurl v1.0.2 // indirect github.com/containers/ocicrypt v1.2.0 // indirect github.com/djherbis/times v1.6.0 // indirect github.com/docker/docker-credential-helpers v0.8.2 // indirect - github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-jose/go-jose/v4 v4.0.3 // indirect + github.com/go-jose/go-jose/v4 v4.0.4 // 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 @@ -91,9 +97,6 @@ require ( 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/cpuid/v2 v2.2.8 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -103,10 +106,9 @@ 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.2 // 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/moby/sys/sequential v0.6.0 // indirect + github.com/moby/sys/symlink v0.3.0 // indirect + github.com/moby/sys/user v0.2.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.2.0 // indirect @@ -114,14 +116,14 @@ require ( 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.3-0.20240612014219-fbbf4953d986 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/procfs v0.12.0 // 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/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // 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 @@ -133,10 +135,14 @@ require ( go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.28.0 // indirect - golang.org/x/exp v0.0.0-20240707233637-46b078467d37 // indirect - google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.20.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240805194559-2c9e96a0b5d4 // indirect google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect lukechampine.com/blake3 v1.3.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect + tags.cncf.io/container-device-interface v0.8.0 // indirect + tags.cncf.io/container-device-interface/specs-go v0.8.0 // indirect ) diff --git a/go.sum b/go.sum index 1faab005720..01c53cc0b89 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,14 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240716105424-66b64c4bb379 h1:shYAfOpsleWVaSwGxQjmi+BBIwzj5jxB1FTCpVqs0N8= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240716105424-66b64c4bb379/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/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/AdamKorcz/go-118-fuzz-build v0.0.0-20231105174938-2b5cbb29f3e2 h1:dIScnXFlF784X79oi7MzVT6GWqr/W1uUt0pB5CsDs9M= github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20231105174938-2b5cbb29f3e2/go.mod h1:gCLVsLfv1egrcZu+GoJATN5ts75F2s62ih/457eWzOw= +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= @@ -14,25 +20,33 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Microsoft/hcsshim v0.12.5 h1:bpTInLlDy/nDRWFVcefDZZ1+U8tS+rz3MxjKgu9boo0= github.com/Microsoft/hcsshim v0.12.5/go.mod h1:tIUGego4G1EN5Hb6KC90aDYiUI2dqLSTTOCjVNpOgZ8= +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= -github.com/cilium/ebpf v0.15.0 h1:7NxJhNiBT3NG8pZJ3c+yfrVdHY8ScgKD27sScgjLMMk= -github.com/cilium/ebpf v0.15.0/go.mod h1:DHp1WyrLeiBh19Cf/tfiSMhqheEiK8fXFZ4No0P1Hso= +github.com/cilium/ebpf v0.11.0 h1:V8gS/bTCCjX9uUnkUFUpPsksM8n1lXBAvHcpiFk1X2Y= +github.com/cilium/ebpf v0.11.0/go.mod h1:WE7CZAnqOL2RouJ4f1uyNhqr2P4CCvXFIqdRDUgWsVs= +github.com/cilium/ebpf v0.16.0 h1:+BiEnHL6Z7lXnlGUsXQPPAE7+kenAd4ES8MQ5min0Ok= +github.com/cilium/ebpf v0.16.0/go.mod h1:L7u2Blt2jMM/vLAVgjxluxtBKlz3/GWjB0dMOEngfwE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 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.5 h1:6YoC9ik3NXdSYtgRn51EMZ2DxzGPyGjZ8M0B7mXTXeQ= github.com/compose-spec/compose-go/v2 v2.1.5/go.mod h1:lFN0DrMxIncJGYAXTfWuajfwj5haBJqrBkarHcnjJKc= -github.com/containerd/accelerated-container-image v1.1.4 h1:9iFHrNRSFnta1A4z6HP1MVD7vH3hEd7jvJv9wnHHJHc= -github.com/containerd/accelerated-container-image v1.1.4/go.mod h1:9mpTpL4W4yAsq2giHgo4B7wTFJgE59qCPh7dZTSpGCA= +github.com/compose-spec/compose-go/v2 v2.1.6 h1:d0Cs0DffmOwmSzs0YPHwKCskknGq2jfGg4uGowlEpps= +github.com/compose-spec/compose-go/v2 v2.1.6/go.mod h1:lFN0DrMxIncJGYAXTfWuajfwj5haBJqrBkarHcnjJKc= +github.com/containerd/accelerated-container-image v1.1.5-0.20240712041225-3c4dd559fed4 h1:9anPRQFoKFkeWr++u+fMOLR2srAjIRms7dqbrouLAXo= +github.com/containerd/accelerated-container-image v1.1.5-0.20240712041225-3c4dd559fed4/go.mod h1:BbY0iTEYD6XZV84E99yjUbs46EGI0CVQrjqb/Wgx9nE= +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.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro= github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= -github.com/containerd/containerd v1.7.20 h1:Sl6jQYk3TRavaU83h66QMbI2Nqg9Jm6qzwX57Vsn1SQ= -github.com/containerd/containerd v1.7.20/go.mod h1:52GsS5CwquuqPuLncsXwG0t2CiUce+KsNHJZQJvAgR0= -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= @@ -43,24 +57,24 @@ github.com/containerd/go-cni v1.1.10 h1:c2U73nld7spSWfiJwSh/8W9DK+/qQwYM2rngIhCy github.com/containerd/go-cni v1.1.10/go.mod h1:/Y/sL8yqYQn1ZG1om1OncJB1W4zN3YmjfP/ShCzG/OY= 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.11 h1:3RULIeLouE7B5l9NzMq0HdPWG0DP5deEVxB5UKxyUoU= -github.com/containerd/imgcrypt v1.1.11/go.mod h1:nXL4jp1GrtO758b16DVsxaHHzu9PravAsKARYmyHR58= +github.com/containerd/imgcrypt v1.2.0-rc1.0.20240709223013-f3769dc3e47f h1:VuW2PlwpES6W86asOw+ysYEpARdlPkwpM6DsT4sbv8U= +github.com/containerd/imgcrypt v1.2.0-rc1.0.20240709223013-f3769dc3e47f/go.mod h1:F9roK2DzKlFnV+h+ZJy/r2FoS28bIvxKgdcoV7o8Sms= 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.14.0 h1:6/eAi6d7MjaeLLuMO8Udfe5GVsDudmrDNO4SGETMBco= -github.com/containerd/nydus-snapshotter v0.14.0/go.mod h1:TT4jv2SnIDxEBu4H2YOvWQHPOap031ydTaHTuvc5VQk= +github.com/containerd/nydus-snapshotter v0.14.1-0.20240806063146-8fa319bfe9c5 h1:NpscnGdkmWwlb0o2Q+rDO/kfoLObfY2sHwB6M5uF58Q= +github.com/containerd/nydus-snapshotter v0.14.1-0.20240806063146-8fa319bfe9c5/go.mod h1:t7X6QEMNSz69fl5e2pF56ibd4XJ6KH9dEBrLnSwyYQk= 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/plugin v0.1.0 h1:CYMyZk9beRAIe1FEKItbMLLAz/z16aXrGc+B+nv0fU4= +github.com/containerd/plugin v0.1.0/go.mod h1:j6HlpMtkiZMgT4UsfVNxPBUkwdw9KQGU6nCLfRxnq+w= +github.com/containerd/stargz-snapshotter v0.15.2-0.20240709063920-1dac5ef89319 h1:Td/dlhRp/kIk9W1rjXHSL87zZZiBQaKPV18OnoEREUA= +github.com/containerd/stargz-snapshotter v0.15.2-0.20240709063920-1dac5ef89319/go.mod h1:dgo5lVziOOnWX8SxxHqYuc8ShsQou54eKLdahxFlHVc= +github.com/containerd/stargz-snapshotter/estargz v0.15.2-0.20240709063920-1dac5ef89319 h1:BRxgmkGWi5vAvajiCwEK+xit4FeFU3GRjbiX4DKTLtM= +github.com/containerd/stargz-snapshotter/estargz v0.15.2-0.20240709063920-1dac5ef89319/go.mod h1:9WSor0wu2swhtYoFkrjy3GHt7aNgKR2A7FhnpP+CH5o= +github.com/containerd/stargz-snapshotter/ipfs v0.15.2-0.20240709063920-1dac5ef89319 h1:WdmIerlurjZSoLI2w8014yzJY+q4qdO/A3ZJBEK7LQA= +github.com/containerd/stargz-snapshotter/ipfs v0.15.2-0.20240709063920-1dac5ef89319/go.mod h1:L/J/O36DzcGxq3drHM45sJRr/pEQTG5u+tbffVhP6r8= 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.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= github.com/containerd/typeurl/v2 v2.2.0 h1:6NBDbQzr7I5LHgp34xAXYF5DOTQDn05X58lsPEmzLso= github.com/containerd/typeurl/v2 v2.2.0/go.mod h1:8XOOxnyatxSWuG8OfsZXVnAF4iZfedjS/8UHSPJnX4g= github.com/containernetworking/cni v1.2.3 h1:hhOcjNVUQTnzdRJ6alC5XF+wd9mfGIUaj8FuJbEslXM= @@ -79,8 +93,9 @@ github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr github.com/cyphar/filepath-securejoin v0.3.1 h1:1V7cHiaW+C+39wEfpH6XlLBQo3j/PciWFrgfCLS8XrE= github.com/cyphar/filepath-securejoin v0.3.1/go.mod h1:F7i41x/9cBF7lzCrVsYs9fuzwRZm4NQsGTBdpp6mETc= 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= @@ -89,12 +104,12 @@ github.com/docker/cli v27.1.1+incompatible h1:goaZxOqs4QKxznZjjBWKONQci/MywhtRv2 github.com/docker/cli v27.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= github.com/docker/docker v27.1.1+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/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= 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-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= @@ -109,17 +124,21 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 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/v4 v4.0.3 h1:o8aphO8Hv6RPmH+GfzVuyf7YXSBibp+8YyHdOoDESGo= -github.com/go-jose/go-jose/v4 v4.0.3/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= +github.com/go-jose/go-jose/v4 v4.0.2 h1:R3l3kkBds16bO7ZFAEEcofK0MkrAJt3jlJznWZG0nvk= +github.com/go-jose/go-jose/v4 v4.0.2/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY= +github.com/go-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E= +github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= 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-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= -github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= 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-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= @@ -151,13 +170,13 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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/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= @@ -171,6 +190,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI 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.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= +github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -192,6 +213,7 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG 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= @@ -202,22 +224,31 @@ github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9Kou github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/sys/signal v0.7.1 h1:PrQxdvxcGijdo6UXXo/lU/TvHUWyPhj7UOpSo8tuvk0= github.com/moby/sys/signal v0.7.1/go.mod h1:Se1VGehYokAkrSQwL4tDzHvETwUZlnY7S5XtQ50mQp8= github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc= github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= +github.com/moby/sys/symlink v0.3.0 h1:GZX89mEZ9u53f97npBy4Rc3vJKj7JBDj/PN2I22GrNU= +github.com/moby/sys/symlink v0.3.0/go.mod h1:3eNdhduHmYPcgsJtZXW1W4XUJdZGBIkttZ8xKqPUJq0= 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/sys/user v0.2.0 h1:OnpapJsRp25vkhw8TFG6OLJODNh/3rEwRWtJ3kakwRM= +github.com/moby/sys/user v0.2.0/go.mod h1:RYstrcWOJpVh+6qzUqp2bU3eaRpdiQeKGlKitaH0PM8= 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.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.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.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-multiaddr v0.13.0 h1:BCBzs61E3AGHcYYTv8dqRH43ZfyrqM8RXVPT8t13tLQ= github.com/multiformats/go-multiaddr v0.13.0/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII= github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= @@ -234,30 +265,35 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 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.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.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.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +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.2.0 h1:qTA3QyfsZSKmvKDL7m5lCl55OmJZXmKf381dSb5Ig9E= github.com/rootless-containers/rootlesskit/v2 v2.2.0/go.mod h1:AyUlpgPnMv085smZXp5mt4D9q4mNjbHOcZwaVobRzyU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +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= @@ -266,6 +302,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-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= 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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -273,6 +311,7 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -281,8 +320,11 @@ 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/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= @@ -301,16 +343,26 @@ github.com/yuchanns/srslog v1.1.0 h1:CEm97Xxxd8XpJThE0gc/XsqUGgPufh5u5MUjC27/KOk github.com/yuchanns/srslog v1.1.0/go.mod h1:HsLjdv3XV02C3kgBW2bTyW6i88OQE+VYJZIxrPKPPak= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 h1:CCriYyAfq1Br1aIYettdHZTy8mBTIPo7We18TuO/bak= go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352/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.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/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +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 v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +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/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +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.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= @@ -322,14 +374,20 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240707233637-46b078467d37 h1:uLDX+AfeFCct3a2C7uIWBKMJIR3CJMhcgfrUAqjRK6w= -golang.org/x/exp v0.0.0-20240707233637-46b078467d37/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 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.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.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= @@ -341,6 +399,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= 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= @@ -352,6 +412,8 @@ golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -367,10 +429,14 @@ golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= 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.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= @@ -390,10 +456,10 @@ 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-20240711142825-46eb208f015d h1:/hmn0Ku5kWij/kjGsrcJeC1T/MrJi2iNWwgAqrihFwc= -google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d/go.mod h1:FfBgJBJg9GcpPvKIuHSZ/aE1g2ecGL74upMzGZjiGEY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d h1:JU0iKnSg02Gmb5ZdV8nYsKEKsP6o/FGVWTrw4i1DA9A= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240805194559-2c9e96a0b5d4 h1:OsSGQeIIsyOEOimVxLEIL4rwGcnrjOydQaiA2bOnZUM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240805194559-2c9e96a0b5d4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= 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= @@ -419,9 +485,24 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= 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.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= +lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE= lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +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 v0.8.0 h1:8bCFo/g9WODjWx3m6EYl3GfUG31eKJbaggyBDxEldRc= +tags.cncf.io/container-device-interface v0.8.0/go.mod h1:Apb7N4VdILW0EVdEMRYXIDVRZfNJZ+kmEUss2kRRQ6Y= +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= +tags.cncf.io/container-device-interface/specs-go v0.8.0 h1:QYGFzGxvYK/ZLMrjhvY0RjpUavIn4KcmRmVP/JjdBTA= +tags.cncf.io/container-device-interface/specs-go v0.8.0/go.mod h1:BhJIkjjPh4qpys+qm4DAYtUyryaTDg9zris+AczXyws= 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/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 e5df76cf27e..449b5f2b998 100644 --- a/pkg/cmd/builder/build.go +++ b/pkg/cmd/builder/build.go @@ -28,9 +28,9 @@ import ( "strconv" "strings" - "github.com/containerd/containerd" - "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" diff --git a/pkg/cmd/compose/compose.go b/pkg/cmd/compose/compose.go index aff935ad08d..0c57aaf869c 100644 --- a/pkg/cmd/compose/compose.go +++ b/pkg/cmd/compose/compose.go @@ -23,7 +23,7 @@ import ( "os" "path/filepath" - "github.com/containerd/containerd" + 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" 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 22de1bc4135..1b8c3538293 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 cc97c1dd0f7..661e465d6c8 100644 --- a/pkg/cmd/container/kill.go +++ b/pkg/cmd/container/kill.go @@ -24,8 +24,8 @@ import ( "strings" "syscall" - "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/errdefs" gocni "github.com/containerd/go-cni" "github.com/containerd/log" diff --git a/pkg/cmd/container/list.go b/pkg/cmd/container/list.go index f30d73a4991..206574d391c 100644 --- a/pkg/cmd/container/list.go +++ b/pkg/cmd/container/list.go @@ -24,9 +24,9 @@ import ( "strings" "time" - "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/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" 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 a20dcd9fb86..1d9193e804b 100644 --- a/pkg/cmd/container/logs.go +++ b/pkg/cmd/container/logs.go @@ -23,7 +23,7 @@ import ( "os/signal" "syscall" - "github.com/containerd/containerd" + 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/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 c86cfeff46d..d62130e0f83 100644 --- a/pkg/cmd/container/remove.go +++ b/pkg/cmd/container/remove.go @@ -25,9 +25,9 @@ import ( "runtime" "syscall" - "github.com/containerd/containerd" - "github.com/containerd/containerd/cio" - "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" 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 0fc0c216612..c533692b279 100644 --- a/pkg/cmd/container/run_mount.go +++ b/pkg/cmd/container/run_mount.go @@ -28,12 +28,12 @@ import ( "strings" "time" - "github.com/containerd/containerd" - "github.com/containerd/containerd/containers" - "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" 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..94bb9acc165 100644 --- a/pkg/cmd/container/run_runtime.go +++ b/pkg/cmd/container/run_runtime.go @@ -20,17 +20,17 @@ 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" + runcoptions "github.com/containerd/containerd/api/types/runc/options" + 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/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 129480cb7c2..b36ae484eb2 100644 --- a/pkg/cmd/container/stats.go +++ b/pkg/cmd/container/stats.go @@ -27,9 +27,9 @@ import ( "text/template" "time" - "github.com/containerd/containerd" eventstypes "github.com/containerd/containerd/api/events" - "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" diff --git a/pkg/cmd/container/stop.go b/pkg/cmd/container/stop.go index 59104016c3d..a385cbd4bec 100644 --- a/pkg/cmd/container/stop.go +++ b/pkg/cmd/container/stop.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + 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" 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..cbbbe60d8eb 100644 --- a/pkg/cmd/image/convert.go +++ b/pkg/cmd/image/convert.go @@ -26,11 +26,11 @@ 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" 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 58f030deffa..aaae4d62adb 100644 --- a/pkg/cmd/image/list.go +++ b/pkg/cmd/image/list.go @@ -29,10 +29,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 8289057cb2a..7dd3c534748 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..3c28cd91d40 100644 --- a/pkg/cmd/image/push.go +++ b/pkg/cmd/image/push.go @@ -23,14 +23,14 @@ import ( "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" 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 0c4030e1342..ae450408165 100644 --- a/pkg/cmd/image/tag.go +++ b/pkg/cmd/image/tag.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + 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" diff --git a/pkg/cmd/login/login.go b/pkg/cmd/login/login.go index 64573c7e0e5..744a7b5a256 100644 --- a/pkg/cmd/login/login.go +++ b/pkg/cmd/login/login.go @@ -27,18 +27,19 @@ import ( "os" "strings" - "github.com/containerd/containerd/remotes/docker" - "github.com/containerd/containerd/remotes/docker/config" - "github.com/containerd/log" - "github.com/containerd/nerdctl/v2/pkg/api/types" - "github.com/containerd/nerdctl/v2/pkg/errutil" - "github.com/containerd/nerdctl/v2/pkg/imgutil/dockerconfigresolver" dockercliconfig "github.com/docker/cli/cli/config" dockercliconfigtypes "github.com/docker/cli/cli/config/types" "github.com/docker/docker/api/types/registry" "github.com/docker/docker/errdefs" "golang.org/x/net/context/ctxhttp" "golang.org/x/term" + + "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" + "github.com/containerd/nerdctl/v2/pkg/imgutil/dockerconfigresolver" ) const unencryptedPasswordWarning = `WARNING: Your password will be stored unencrypted in %s. 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 ecb24e10e9e..e4b1f9c24f5 100644 --- a/pkg/cmd/namespace/remove.go +++ b/pkg/cmd/namespace/remove.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "github.com/containerd/containerd" + 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/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 08a890e3942..c72191a7372 100644 --- a/pkg/cmd/system/events.go +++ b/pkg/cmd/system/events.go @@ -26,9 +26,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 6fce7d68334..6d43f063a4c 100644 --- a/pkg/cmd/system/info.go +++ b/pkg/cmd/system/info.go @@ -24,13 +24,13 @@ import ( "strings" "text/template" - "github.com/containerd/containerd" - "github.com/containerd/containerd/api/services/introspection/v1" - "github.com/containerd/log" "github.com/docker/go-units" "golang.org/x/text/cases" "golang.org/x/text/language" + "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" "github.com/containerd/nerdctl/v2/pkg/formatter" "github.com/containerd/nerdctl/v2/pkg/infoutil" 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/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 ab9728be34f..aa051d1cc55 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 9333abad302..d7327845cf7 100644 --- a/pkg/cmd/volume/rm.go +++ b/pkg/cmd/volume/rm.go @@ -22,7 +22,7 @@ import ( "errors" "fmt" - "github.com/containerd/containerd" + 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/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/create.go b/pkg/composer/create.go index f08ee0b50f3..5e261d00f07 100644 --- a/pkg/composer/create.go +++ b/pkg/composer/create.go @@ -23,11 +23,12 @@ import ( "path/filepath" "strings" + "golang.org/x/sync/errgroup" + "github.com/compose-spec/compose-go/v2/types" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/composer/serviceparser" "github.com/containerd/nerdctl/v2/pkg/labels" - "golang.org/x/sync/errgroup" ) // FYI: https://github.com/docker/compose/blob/v2.14.1/pkg/api/api.go#L423 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/kill.go b/pkg/composer/kill.go index 04b14a870c0..204ad30690a 100644 --- a/pkg/composer/kill.go +++ b/pkg/composer/kill.go @@ -19,8 +19,9 @@ package composer import ( "context" - "github.com/containerd/log" "golang.org/x/sync/errgroup" + + "github.com/containerd/log" ) type KillOptions struct { 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..b89bfec4d67 100644 --- a/pkg/composer/pause.go +++ b/pkg/composer/pause.go @@ -22,10 +22,11 @@ import ( "io" "sync" - "github.com/containerd/containerd" + "golang.org/x/sync/errgroup" + + 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" ) // Pause pauses service containers belonging to `services`. 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/run.go b/pkg/composer/run.go index d63b388aa01..b7d6e88bd15 100644 --- a/pkg/composer/run.go +++ b/pkg/composer/run.go @@ -22,12 +22,13 @@ import ( "fmt" "sync" + "golang.org/x/sync/errgroup" + "github.com/compose-spec/compose-go/v2/format" "github.com/compose-spec/compose-go/v2/types" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/composer/serviceparser" "github.com/containerd/nerdctl/v2/pkg/idgen" - "golang.org/x/sync/errgroup" ) type RunOptions struct { diff --git a/pkg/composer/serviceparser/build.go b/pkg/composer/serviceparser/build.go index ce39d67a163..ec95fc66591 100644 --- a/pkg/composer/serviceparser/build.go +++ b/pkg/composer/serviceparser/build.go @@ -23,7 +23,7 @@ import ( "strings" "github.com/compose-spec/compose-go/v2/types" - "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/composer/up_service.go b/pkg/composer/up_service.go index 8838eced927..70dd9e5b4d2 100644 --- a/pkg/composer/up_service.go +++ b/pkg/composer/up_service.go @@ -25,11 +25,11 @@ import ( "strings" "sync" + "golang.org/x/sync/errgroup" + "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/composer/serviceparser" "github.com/containerd/nerdctl/v2/pkg/labels" - - "golang.org/x/sync/errgroup" ) func (c *Composer) upServices(ctx context.Context, parsedServices []*serviceparser.Service, uo UpOptions) error { 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/consoleutil/consoleutil_unix.go b/pkg/consoleutil/consoleutil_unix.go index 6ffd0cc4dda..d3bd02f0204 100644 --- a/pkg/consoleutil/consoleutil_unix.go +++ b/pkg/consoleutil/consoleutil_unix.go @@ -23,9 +23,10 @@ import ( "os" "os/signal" + "golang.org/x/sys/unix" + "github.com/containerd/console" "github.com/containerd/log" - "golang.org/x/sys/unix" ) // HandleConsoleResize resizes the console. 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 3ac41551e75..2e3fe0c86d1 100644 --- a/pkg/containerinspector/containerinspector.go +++ b/pkg/containerinspector/containerinspector.go @@ -19,7 +19,7 @@ package containerinspector import ( "context" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/native" 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 91424c42ff5..8a033ce9a31 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 0d918e526e2..fd7f6e82b98 100644 --- a/pkg/containerutil/cp_linux.go +++ b/pkg/containerutil/cp_linux.go @@ -28,8 +28,8 @@ import ( "strconv" "strings" - "github.com/containerd/containerd" - "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" 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/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 7b3199d6be3..de313688792 100644 --- a/pkg/formatter/formatter.go +++ b/pkg/formatter/formatter.go @@ -25,16 +25,16 @@ import ( "strings" "time" + "github.com/docker/go-units" "golang.org/x/text/cases" "golang.org/x/text/language" - "github.com/containerd/containerd" - "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" ) func ContainerStatus(ctx context.Context, c containerd.Container) string { 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 9d43cb31a3e..e844a601bd7 100644 --- a/pkg/imgutil/commit/commit.go +++ b/pkg/imgutil/commit/commit.go @@ -27,14 +27,14 @@ 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/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" diff --git a/pkg/imgutil/converter/zstd.go b/pkg/imgutil/converter/zstd.go index 1de2355cdd7..417175253d5 100644 --- a/pkg/imgutil/converter/zstd.go +++ b/pkg/imgutil/converter/zstd.go @@ -21,11 +21,11 @@ import ( "fmt" "io" - "github.com/containerd/containerd/archive/compression" - "github.com/containerd/containerd/content" - "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" diff --git a/pkg/imgutil/dockerconfigresolver/dockerconfigresolver.go b/pkg/imgutil/dockerconfigresolver/dockerconfigresolver.go index bad0a33c444..af59898e93f 100644 --- a/pkg/imgutil/dockerconfigresolver/dockerconfigresolver.go +++ b/pkg/imgutil/dockerconfigresolver/dockerconfigresolver.go @@ -23,9 +23,9 @@ import ( "fmt" "os" - "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" 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 0fb33eded2c..baa54dd60a6 100644 --- a/pkg/imgutil/imgutil.go +++ b/pkg/imgutil/imgutil.go @@ -22,11 +22,11 @@ import ( "fmt" "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 57329468065..b56db6bfa03 100644 --- a/pkg/imgutil/jobs/jobs.go +++ b/pkg/imgutil/jobs/jobs.go @@ -24,9 +24,9 @@ import ( "text/tabwriter" "time" - "github.com/containerd/containerd/content" - "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" 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..5fd2447dcd5 100644 --- a/pkg/imgutil/push/push.go +++ b/pkg/imgutil/push/push.go @@ -25,17 +25,17 @@ 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" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "golang.org/x/sync/errgroup" + + 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" - ocispec "github.com/opencontainers/image-spec/specs-go/v1" - - "golang.org/x/sync/errgroup" ) // Push pushes an image to a remote registry. diff --git a/pkg/imgutil/snapshotter.go b/pkg/imgutil/snapshotter.go index 0c787767eea..c56864413f0 100644 --- a/pkg/imgutil/snapshotter.go +++ b/pkg/imgutil/snapshotter.go @@ -19,9 +19,9 @@ package imgutil import ( "strings" - "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" 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..1f02fa4b311 100644 --- a/pkg/infoutil/infoutil.go +++ b/pkg/infoutil/infoutil.go @@ -26,9 +26,9 @@ import ( "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) 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 6f01255a7b6..11a013bfd04 100644 --- a/pkg/infoutil/infoutil_windows.go +++ b/pkg/infoutil/infoutil_windows.go @@ -21,13 +21,13 @@ import ( "runtime" "strings" - "github.com/containerd/log" "github.com/docker/docker/pkg/meminfo" - "github.com/docker/docker/pkg/sysinfo" "golang.org/x/sys/windows" "golang.org/x/sys/windows/registry" + "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/inspecttypes/dockercompat" + "github.com/containerd/nerdctl/v2/pkg/sysinfo" ) const UnameO = "Microsoft Windows" diff --git a/pkg/infoutil/infoutil_windows_test.go b/pkg/infoutil/infoutil_windows_test.go index d59c157513c..173cf1927e4 100644 --- a/pkg/infoutil/infoutil_windows_test.go +++ b/pkg/infoutil/infoutil_windows_test.go @@ -19,11 +19,12 @@ package infoutil import ( "testing" - mocks "github.com/containerd/nerdctl/v2/pkg/infoutil/infoutilmock" "go.uber.org/mock/gomock" "golang.org/x/sys/windows" "golang.org/x/sys/windows/registry" "gotest.tools/v3/assert" + + mocks "github.com/containerd/nerdctl/v2/pkg/infoutil/infoutilmock" ) func setUpMocks(t *testing.T) *mocks.MockWindowsInfoUtil { diff --git a/pkg/inspecttypes/dockercompat/dockercompat.go b/pkg/inspecttypes/dockercompat/dockercompat.go index 88538906a3b..b701e0f1d51 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 f0a8f36c219..ce6be9b500c 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/lockutil/lockutil_unix.go b/pkg/lockutil/lockutil_unix.go index 9b3d9d98932..7be6844aaf3 100644 --- a/pkg/lockutil/lockutil_unix.go +++ b/pkg/lockutil/lockutil_unix.go @@ -22,8 +22,9 @@ import ( "fmt" "os" - "github.com/containerd/log" "golang.org/x/sys/unix" + + "github.com/containerd/log" ) func WithDirLock(dir string, fn func() error) error { diff --git a/pkg/lockutil/lockutil_windows.go b/pkg/lockutil/lockutil_windows.go index a269fc65716..72dbce35357 100644 --- a/pkg/lockutil/lockutil_windows.go +++ b/pkg/lockutil/lockutil_windows.go @@ -20,8 +20,9 @@ import ( "fmt" "os" - "github.com/containerd/log" "golang.org/x/sys/windows" + + "github.com/containerd/log" ) func WithDirLock(dir string, fn func() error) error { 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 f76c053bca4..8f3141657d0 100644 --- a/pkg/logging/json_logger.go +++ b/pkg/logging/json_logger.go @@ -26,7 +26,7 @@ import ( "strconv" "time" - "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/containerd/nerdctl/v2/pkg/logging/jsonfile" diff --git a/pkg/logging/logging.go b/pkg/logging/logging.go index 3644d8b79a6..b704c874a8f 100644 --- a/pkg/logging/logging.go +++ b/pkg/logging/logging.go @@ -29,7 +29,7 @@ import ( "sync" "time" - "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/fsnotify/fsnotify" 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 fccff47bbe6..ae41098b301 100644 --- a/pkg/mountutil/mountutil.go +++ b/pkg/mountutil/mountutil.go @@ -23,9 +23,9 @@ import ( "runtime" "strings" - "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/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 396b772bb2f..5d32299a2ca 100644 --- a/pkg/mountutil/mountutil_freebsd.go +++ b/pkg/mountutil/mountutil_freebsd.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - "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..dbc605aade4 100644 --- a/pkg/mountutil/mountutil_linux.go +++ b/pkg/mountutil/mountutil_linux.go @@ -25,15 +25,16 @@ import ( "strconv" "strings" - "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/mount" - "github.com/containerd/containerd/oci" - "github.com/containerd/log" - "github.com/containerd/nerdctl/v2/pkg/mountutil/volumestore" "github.com/docker/go-units" mobymount "github.com/moby/sys/mount" "github.com/opencontainers/runtime-spec/specs-go" "golang.org/x/sys/unix" + + "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" ) /* 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 447aaca5cb1..e6782cb3405 100644 --- a/pkg/mountutil/mountutil_windows.go +++ b/pkg/mountutil/mountutil_windows.go @@ -29,7 +29,7 @@ import ( "regexp" "strings" - "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 627e78abafe..c7bfc1ccbed 100644 --- a/pkg/mountutil/volumestore/volumestore.go +++ b/pkg/mountutil/volumestore/volumestore.go @@ -23,7 +23,7 @@ import ( "os" "path/filepath" - "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" 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 637c8fd96d5..49341644441 100644 --- a/pkg/netutil/netutil.go +++ b/pkg/netutil/netutil.go @@ -30,8 +30,8 @@ import ( "strconv" "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/errdefs" "github.com/containerd/log" "github.com/containerd/nerdctl/v2/pkg/api/types" 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/signalutil/signals.go b/pkg/signalutil/signals.go index ac4baa9662b..b35eacbb121 100644 --- a/pkg/signalutil/signals.go +++ b/pkg/signalutil/signals.go @@ -22,7 +22,7 @@ import ( "os/signal" "syscall" - "github.com/containerd/containerd" + containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/errdefs" "github.com/containerd/log" ) diff --git a/pkg/snapshotterutil/socisource.go b/pkg/snapshotterutil/socisource.go index 85088388d90..fb91fc991e6 100644 --- a/pkg/snapshotterutil/socisource.go +++ b/pkg/snapshotterutil/socisource.go @@ -40,9 +40,9 @@ import ( "fmt" "strings" - "github.com/containerd/containerd/images" - "github.com/containerd/containerd/labels" - ctdsnapshotters "github.com/containerd/containerd/pkg/snapshotters" + "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/pkg/labels" + ctdsnapshotters "github.com/containerd/containerd/v2/pkg/snapshotters" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/pkg/sysinfo/README.md b/pkg/sysinfo/README.md new file mode 100644 index 00000000000..1faa9d9a6d8 --- /dev/null +++ b/pkg/sysinfo/README.md @@ -0,0 +1,5 @@ +This here is a copy of https://github.com/moby/moby/tree/master/pkg/sysinfo +as of cff4f20c44a3a7c882ed73934dec6a77246c6323. + +This may be removed and possibly replaced by the original from moby once they +have migrated to containerd v2. \ No newline at end of file diff --git a/pkg/sysinfo/cgroup2_linux.go b/pkg/sysinfo/cgroup2_linux.go new file mode 100644 index 00000000000..627cb29f42a --- /dev/null +++ b/pkg/sysinfo/cgroup2_linux.go @@ -0,0 +1,161 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package 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..2e80f898b06 --- /dev/null +++ b/pkg/sysinfo/numcpu.go @@ -0,0 +1,31 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package 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..eeb7486d290 --- /dev/null +++ b/pkg/sysinfo/numcpu_linux.go @@ -0,0 +1,33 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package 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..833e6a2ed69 --- /dev/null +++ b/pkg/sysinfo/numcpu_other.go @@ -0,0 +1,24 @@ +//go:build !linux && !windows + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package 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..2702eaf16ed --- /dev/null +++ b/pkg/sysinfo/numcpu_windows.go @@ -0,0 +1,52 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package 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..052ac567c9a --- /dev/null +++ b/pkg/sysinfo/sysinfo.go @@ -0,0 +1,186 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package 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..de8233a1d93 --- /dev/null +++ b/pkg/sysinfo/sysinfo_linux.go @@ -0,0 +1,322 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package 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..e8e432064a8 --- /dev/null +++ b/pkg/sysinfo/sysinfo_linux_test.go @@ -0,0 +1,140 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package sysinfo // import "github.com/docker/docker/pkg/sysinfo" + +import ( + "os" + "path" + "path/filepath" + "testing" + + "golang.org/x/sys/unix" + "gotest.tools/v3/assert" + + "github.com/containerd/nerdctl/v2/pkg/rootlessutil" +) + +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..5b70b677520 --- /dev/null +++ b/pkg/sysinfo/sysinfo_other.go @@ -0,0 +1,24 @@ +//go:build !linux + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package 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..b763711d490 --- /dev/null +++ b/pkg/sysinfo/sysinfo_test.go @@ -0,0 +1,42 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package 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 b966a137d76..1777e292238 100644 --- a/pkg/taskutil/taskutil.go +++ b/pkg/taskutil/taskutil.go @@ -29,14 +29,15 @@ import ( "syscall" "github.com/Masterminds/semver/v3" + "golang.org/x/term" + "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" "github.com/containerd/nerdctl/v2/pkg/infoutil" - "golang.org/x/term" ) // NewTask is from https://github.com/containerd/containerd/blob/v1.4.3/cmd/ctr/commands/tasks/tasks_unix.go#L70-L108 diff --git a/pkg/testutil/testregistry/testregistry_linux.go b/pkg/testutil/testregistry/testregistry_linux.go index 24c29058908..811176c4c3c 100644 --- a/pkg/testutil/testregistry/testregistry_linux.go +++ b/pkg/testutil/testregistry/testregistry_linux.go @@ -23,12 +23,13 @@ import ( "path/filepath" "strconv" + "golang.org/x/crypto/bcrypt" + "gotest.tools/v3/assert" + "github.com/containerd/nerdctl/v2/pkg/testutil" "github.com/containerd/nerdctl/v2/pkg/testutil/nettestutil" "github.com/containerd/nerdctl/v2/pkg/testutil/portlock" "github.com/containerd/nerdctl/v2/pkg/testutil/testca" - "golang.org/x/crypto/bcrypt" - "gotest.tools/v3/assert" ) type RegistryServer struct { diff --git a/pkg/testutil/testutil.go b/pkg/testutil/testutil.go index de80334f09e..058b4417b40 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/nerdctl/v2/pkg/buildkitutil" "github.com/containerd/nerdctl/v2/pkg/imgutil" "github.com/containerd/nerdctl/v2/pkg/infoutil" diff --git a/pkg/testutil/testutil_windows.go b/pkg/testutil/testutil_windows.go index 76740064de5..54bf1e05b25 100644 --- a/pkg/testutil/testutil_windows.go +++ b/pkg/testutil/testutil_windows.go @@ -23,8 +23,9 @@ import ( "sync" "github.com/Microsoft/hcsshim" - "github.com/containerd/nerdctl/v2/pkg/inspecttypes/dockercompat" "golang.org/x/sys/windows/svc/mgr" + + "github.com/containerd/nerdctl/v2/pkg/inspecttypes/dockercompat" ) const (