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 4, 2024
1 parent 866a176 commit 6512f78
Show file tree
Hide file tree
Showing 191 changed files with 1,464 additions and 563 deletions.
2 changes: 1 addition & 1 deletion cmd/nerdctl/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"time"

"github.com/containerd/containerd"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/labels"
"github.com/containerd/nerdctl/v2/pkg/netutil"
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
6 changes: 3 additions & 3 deletions cmd/nerdctl/compose_ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"text/tabwriter"
"time"

"github.com/containerd/containerd"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime/restart"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/core/runtime/restart"
"github.com/containerd/errdefs"
gocni "github.com/containerd/go-cni"
"github.com/containerd/log"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
Expand Down
4 changes: 2 additions & 2 deletions cmd/nerdctl/compose_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"fmt"
"os"

"github.com/containerd/containerd"
"github.com/containerd/containerd/errdefs"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/errdefs"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
"github.com/containerd/nerdctl/v2/pkg/containerutil"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/compose_top.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package main
import (
"fmt"

"github.com/containerd/containerd"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/compose"
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
6 changes: 3 additions & 3 deletions cmd/nerdctl/container_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"path/filepath"
"time"

"github.com/containerd/containerd"
"github.com/containerd/containerd/leases"
"github.com/containerd/containerd/mount"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/core/leases"
"github.com/containerd/containerd/v2/core/mount"
"github.com/containerd/continuity/fs"
"github.com/containerd/log"
"github.com/containerd/nerdctl/v2/pkg/api/types"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package main
import (
"errors"

"github.com/containerd/containerd"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/container"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_kill.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
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_pause.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
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_run_cgroup_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_run_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_run_mount_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"
"testing"

"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/v2/core/mount"
"github.com/containerd/nerdctl/v2/pkg/rootlessutil"
"github.com/containerd/nerdctl/v2/pkg/testutil"
mobymount "github.com/moby/sys/mount"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_run_network_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"testing"

"github.com/containerd/containerd/errdefs"
"github.com/containerd/errdefs"
"github.com/containerd/nerdctl/v2/pkg/rootlessutil"
"github.com/containerd/nerdctl/v2/pkg/testutil"
"github.com/containerd/nerdctl/v2/pkg/testutil/nettestutil"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_start.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
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_stats.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
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package main
import (
"time"

"github.com/containerd/containerd"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/container"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_top.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"errors"
"fmt"

"github.com/containerd/containerd"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/container"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_unpause.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
6 changes: 3 additions & 3 deletions cmd/nerdctl/container_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"fmt"
"runtime"

"github.com/containerd/containerd"
"github.com/containerd/containerd/containers"
"github.com/containerd/containerd/errdefs"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/core/containers"
"github.com/containerd/errdefs"
"github.com/containerd/log"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/container_wait.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
4 changes: 2 additions & 2 deletions cmd/nerdctl/image_encrypt_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/image_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"text/template"
"time"

"github.com/containerd/containerd"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/log"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/formatter"
Expand Down
4 changes: 2 additions & 2 deletions cmd/nerdctl/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"
"text/tabwriter"

"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/log"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/mountutil/volumestore"
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/network_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package main
import (
"fmt"

"github.com/containerd/containerd/identifiers"
"github.com/containerd/containerd/v2/pkg/identifiers"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/cmd/network"
"github.com/containerd/nerdctl/v2/pkg/strutil"
Expand Down
Loading

0 comments on commit 6512f78

Please sign in to comment.