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..4665f84a692 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,13 @@ 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 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..55459f9317c 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ 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-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-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-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= @@ -14,25 +14,29 @@ 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.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 +47,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 +83,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= @@ -93,8 +98,6 @@ github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZ 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= @@ -111,8 +114,8 @@ github.com/fluent/fluent-logger-golang v1.9.0 h1:zUdY44CHX2oIUc7VTNZc+4m+ORuO/ml github.com/fluent/fluent-logger-golang v1.9.0/go.mod h1:2/HCT/jTy78yGyeNGQLGQsjF3zzzAuy6Xlk6FCMV5eU= 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.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.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -151,13 +154,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= @@ -167,6 +170,10 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= +github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA= +github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= +github.com/jsimonetti/rtnetlink/v2 v2.0.1 h1:xda7qaHDSVOsADNouv7ukSuicKZO7GgVUCXxpaIEIlM= +github.com/jsimonetti/rtnetlink/v2 v2.0.1/go.mod h1:7MoNYNbb3UaDHtF8udiJo/RH6VsTKP1pqKLUTVCvToE= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= @@ -184,6 +191,10 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= +github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g= +github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw= +github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U= +github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= @@ -192,6 +203,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= @@ -200,18 +212,19 @@ github.com/moby/sys/mount v0.3.4 h1:yn5jq4STPztkkzSKpZkLcmjue+bZJ0u2AuQY1iNI1Ww= github.com/moby/sys/mount v0.3.4/go.mod h1:KcQJMbQdJHPlq5lcYT+/CjatWM4PuxKe+XLSVS4J6Os= github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg= 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/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= -github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +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.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= @@ -234,20 +247,23 @@ 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= @@ -258,6 +274,7 @@ github.com/rootless-containers/bypass4netns v0.4.1/go.mod h1:slu3ygwy1x6ey78oBTN 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= @@ -273,6 +290,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 +299,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= @@ -320,16 +341,18 @@ go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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.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= @@ -339,8 +362,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 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,11 +375,12 @@ 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= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -365,12 +389,12 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.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 +414,8 @@ 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-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= @@ -425,3 +447,9 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE= lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +tags.cncf.io/container-device-interface v0.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.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 (