Skip to content

Commit

Permalink
Update to containerd v2
Browse files Browse the repository at this point in the history
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
  • Loading branch information
apostasie committed Jul 25, 2024
1 parent bec95c4 commit 30b1c33
Show file tree
Hide file tree
Showing 245 changed files with 1,621 additions and 508 deletions.
4 changes: 2 additions & 2 deletions cmd/nerdctl/apparmor_inspect_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/apparmor_list_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/apparmor_load_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/apparmor_unload_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions cmd/nerdctl/builder_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions cmd/nerdctl/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/completion_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_down.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions cmd/nerdctl/compose_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"strings"
"text/tabwriter"

"github.com/containerd/containerd"
"github.com/containerd/containerd/pkg/progress"
"github.com/containerd/containerd/snapshots"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/core/snapshots"
"github.com/containerd/containerd/v2/pkg/progress"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/formatter"
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_kill.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_pause.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 5 additions & 4 deletions cmd/nerdctl/compose_ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/compose_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"os"

"github.com/containerd/containerd"
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"
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/compose_stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions cmd/nerdctl/compose_top.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 4 additions & 5 deletions cmd/nerdctl/compose_up_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion cmd/nerdctl/container_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading

0 comments on commit 30b1c33

Please sign in to comment.