Skip to content

Commit 1666cda

Browse files
authored
Merge pull request #80 from AkihiroSuda/dev
update dependencies
2 parents 4fd2c53 + a478647 commit 1666cda

File tree

10 files changed

+176
-576
lines changed

10 files changed

+176
-576
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- uses: actions/setup-go@v2
1515
with:
16-
go-version: 1.15.x
16+
go-version: 1.16.x
1717
- uses: actions/checkout@v2
1818
with:
1919
path: go/src/github.com/AkihiroSuda/nerdctl

.github/workflows/test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@ jobs:
2424
test:
2525
runs-on: ubuntu-20.04
2626
timeout-minutes: 20
27+
strategy:
28+
matrix:
29+
containerd: [1.4.3, 1.5.0-beta.2]
30+
env:
31+
CONTAINERD_VERSION: "${{ matrix.containerd }}"
2732
steps:
2833
- uses: actions/checkout@v2
2934
with:
3035
fetch-depth: 1
3136
- name: "Prepare test environment"
32-
run: DOCKER_BUILDKIT=1 docker build -t test --target test .
37+
run: DOCKER_BUILDKIT=1 docker build -t test --target test --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} .
3338
- name: "Test"
3439
run: docker run -t --rm --privileged test go test -v -test.kill-daemon ./...
3540

@@ -39,7 +44,7 @@ jobs:
3944
steps:
4045
- uses: actions/setup-go@v2
4146
with:
42-
go-version: 1.15.x
47+
go-version: 1.16.x
4348
- uses: actions/checkout@v2
4449
with:
4550
fetch-depth: 1
@@ -52,7 +57,7 @@ jobs:
5257
steps:
5358
- uses: actions/setup-go@v2
5459
with:
55-
go-version: 1.15.x
60+
go-version: 1.16.x
5661
- uses: actions/checkout@v2
5762
with:
5863
fetch-depth: 1
@@ -67,7 +72,7 @@ jobs:
6772
steps:
6873
- uses: actions/setup-go@v2
6974
with:
70-
go-version: 1.15.x
75+
go-version: 1.16.x
7176
- uses: actions/checkout@v2
7277
with:
7378
fetch-depth: 1

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Usage: `docker run -it --privileged <IMAGE>`. Make sure to add `-t` and `--privileged`.
22
ARG UBUNTU_VERSION=20.04
3-
ARG CONTAINERIZED_SYSTEMD_VERSION=0.1.0
4-
ARG CONTAINERD_VERSION=1.4.3
5-
ARG RUNC_VERSION=1.0.0-rc92
6-
ARG CNI_PLUGINS_VERSION=0.9.0
3+
ARG CONTAINERIZED_SYSTEMD_VERSION=0.1.1
4+
ARG CONTAINERD_VERSION=1.5.0-beta.2
5+
ARG RUNC_VERSION=1.0.0-rc93
6+
ARG CNI_PLUGINS_VERSION=0.9.1
77
ARG CNI_ISOLATION_VERSION=0.0.3
8-
ARG BUILDKIT_VERSION=0.8.1
9-
ARG GO_VERSION=1.15.8
8+
ARG BUILDKIT_VERSION=0.8.2
9+
ARG GO_VERSION=1.16
1010

1111
FROM mirror.gcr.io/library/ubuntu:${UBUNTU_VERSION} AS base
1212
ENV DEBIAN_FRONTEND=noninteractive

build_test.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,15 @@ import (
3131
)
3232

3333
func TestBuild(t *testing.T) {
34-
buildkitHost := defaults.BuildKitHost()
35-
t.Logf("buildkitHost=%q", buildkitHost)
36-
if err := buildkitutil.PingBKDaemon(buildkitHost); err != nil {
37-
t.Skipf("test requires buildkitd: %+v", err)
38-
}
3934
base := testutil.NewBase(t)
35+
if base.Target == testutil.Nerdctl {
36+
buildkitHost := defaults.BuildKitHost()
37+
t.Logf("buildkitHost=%q", buildkitHost)
38+
if err := buildkitutil.PingBKDaemon(buildkitHost); err != nil {
39+
t.Skipf("test requires buildkitd: %+v", err)
40+
}
41+
}
42+
4043
const imageName = "nerdctl-build-test"
4144
defer base.Cmd("rmi", imageName).Run()
4245

exec.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"github.com/containerd/containerd/cio"
2929
"github.com/containerd/containerd/cmd/ctr/commands"
3030
"github.com/containerd/containerd/cmd/ctr/commands/tasks"
31-
"github.com/containerd/containerd/oci"
31+
"github.com/containerd/containerd/pkg/cap"
3232
"github.com/opencontainers/runtime-spec/specs-go"
3333
"github.com/pkg/errors"
3434
"github.com/sirupsen/logrus"
@@ -224,7 +224,11 @@ func generateExecProcessSpec(ctx context.Context, clicontext *cli.Context, conta
224224
if pspec.Capabilities == nil {
225225
pspec.Capabilities = &specs.LinuxCapabilities{}
226226
}
227-
pspec.Capabilities.Bounding = oci.GetAllCapabilities()
227+
allCaps, err := cap.Current()
228+
if err != nil {
229+
return nil, err
230+
}
231+
pspec.Capabilities.Bounding = allCaps
228232
pspec.Capabilities.Permitted = pspec.Capabilities.Bounding
229233
pspec.Capabilities.Inheritable = pspec.Capabilities.Bounding
230234
pspec.Capabilities.Effective = pspec.Capabilities.Bounding

go.mod

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
11
module github.com/AkihiroSuda/nerdctl
22

3-
go 1.15
3+
go 1.16
44

55
require (
6-
github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102
6+
github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68
77
github.com/containerd/console v1.0.1
8-
github.com/containerd/containerd v1.4.1-0.20201229174909-9067796ce4c8
8+
github.com/containerd/containerd v1.5.0-beta.2
99
github.com/containerd/go-cni v1.0.1
10-
github.com/containerd/stargz-snapshotter v0.2.1-0.20210101143201-d58f43a8235e
11-
github.com/containerd/stargz-snapshotter/estargz v0.0.0-00010101000000-000000000000
10+
github.com/containerd/stargz-snapshotter v0.4.1
11+
github.com/containerd/stargz-snapshotter/estargz v0.4.1
1212
github.com/containerd/typeurl v1.0.1
13-
github.com/containernetworking/cni v0.8.0
14-
github.com/containernetworking/plugins v0.9.0
15-
github.com/docker/cli v20.10.3+incompatible
16-
github.com/docker/docker v20.10.3+incompatible
13+
github.com/containernetworking/cni v0.8.1
14+
github.com/containernetworking/plugins v0.9.1
15+
github.com/docker/cli v20.10.5+incompatible
16+
github.com/docker/docker v20.10.5+incompatible
1717
github.com/docker/go-units v0.4.0
1818
github.com/fvbommel/sortorder v1.0.2 // indirect
19-
github.com/gogo/protobuf v1.3.1
20-
github.com/google/go-cmp v0.5.4 // indirect
21-
github.com/lib/pq v1.9.0 // indirect
22-
github.com/mattn/go-isatty v0.0.12
19+
github.com/gogo/protobuf v1.3.2
20+
github.com/mattn/go-isatty v0.0.4
2321
github.com/moby/sys/mount v0.2.0 // indirect
24-
github.com/onsi/ginkgo v1.14.2 // indirect
25-
github.com/onsi/gomega v1.10.4 // indirect
22+
github.com/morikuni/aec v1.0.0 // indirect
2623
github.com/opencontainers/go-digest v1.0.0
2724
github.com/opencontainers/image-spec v1.0.1
28-
github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6
25+
github.com/opencontainers/runtime-spec v1.0.3-0.20210303205135-43e4633e40c1
2926
github.com/pkg/errors v0.9.1
3027
github.com/rootless-containers/rootlesskit v0.14.0-beta.0
3128
github.com/sirupsen/logrus v1.8.0
@@ -36,11 +33,5 @@ require (
3633
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9
3734
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
3835
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4
39-
golang.org/x/text v0.3.4 // indirect
40-
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
41-
gopkg.in/yaml.v2 v2.4.0 // indirect
4236
gotest.tools/v3 v3.0.2
4337
)
44-
45-
// estargz: needs this replace because stargz-snapshotter git repo has two go.mod modules.
46-
replace github.com/containerd/stargz-snapshotter/estargz => github.com/containerd/stargz-snapshotter/estargz v0.0.0-20210101143201-d58f43a8235e

0 commit comments

Comments
 (0)