update containerd daemon to 1.2.7 and old to 1.1.7

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
v0.7
Tonis Tiigi 2019-08-01 15:38:24 -07:00
parent 615347271d
commit b407790852
9 changed files with 25 additions and 25 deletions

View File

@ -82,7 +82,7 @@ make test TESTPKGS=./client
make test TESTPKGS=./client TESTFLAGS="--run /TestCallDiskUsage -v" make test TESTPKGS=./client TESTFLAGS="--run /TestCallDiskUsage -v"
# run all integration tests with a specific worker # run all integration tests with a specific worker
# supported workers: oci, oci-rootless, containerd, containerd-1.0 # supported workers: oci, oci-rootless, containerd, containerd-1.1
make test TESTPKGS=./client TESTFLAGS="--run //worker=containerd -v" make test TESTPKGS=./client TESTFLAGS="--run //worker=containerd -v"
``` ```

View File

@ -17,7 +17,7 @@ type buildOpt struct {
func main() { func main() {
var opt buildOpt var opt buildOpt
flag.BoolVar(&opt.withContainerd, "with-containerd", true, "enable containerd worker") flag.BoolVar(&opt.withContainerd, "with-containerd", true, "enable containerd worker")
flag.StringVar(&opt.containerd, "containerd", "v1.2.1", "containerd version") flag.StringVar(&opt.containerd, "containerd", "v1.2.7", "containerd version")
flag.StringVar(&opt.runc, "runc", "v1.0.0-rc8", "runc version") flag.StringVar(&opt.runc, "runc", "v1.0.0-rc8", "runc version")
flag.Parse() flag.Parse()

View File

@ -17,7 +17,7 @@ type buildOpt struct {
func main() { func main() {
var opt buildOpt var opt buildOpt
flag.BoolVar(&opt.withContainerd, "with-containerd", true, "enable containerd worker") flag.BoolVar(&opt.withContainerd, "with-containerd", true, "enable containerd worker")
flag.StringVar(&opt.containerd, "containerd", "v1.2.1", "containerd version") flag.StringVar(&opt.containerd, "containerd", "v1.2.7", "containerd version")
flag.StringVar(&opt.runc, "runc", "v1.0.0-rc8", "runc version") flag.StringVar(&opt.runc, "runc", "v1.0.0-rc8", "runc version")
flag.Parse() flag.Parse()

View File

@ -17,7 +17,7 @@ type buildOpt struct {
func main() { func main() {
var opt buildOpt var opt buildOpt
flag.BoolVar(&opt.withContainerd, "with-containerd", true, "enable containerd worker") flag.BoolVar(&opt.withContainerd, "with-containerd", true, "enable containerd worker")
flag.StringVar(&opt.containerd, "containerd", "v1.2.1", "containerd version") flag.StringVar(&opt.containerd, "containerd", "v1.2.7", "containerd version")
flag.StringVar(&opt.runc, "runc", "v1.0.0-rc8", "runc version") flag.StringVar(&opt.runc, "runc", "v1.0.0-rc8", "runc version")
flag.Parse() flag.Parse()

View File

@ -18,7 +18,7 @@ type buildOpt struct {
func main() { func main() {
var opt buildOpt var opt buildOpt
flag.BoolVar(&opt.withContainerd, "with-containerd", true, "enable containerd worker") flag.BoolVar(&opt.withContainerd, "with-containerd", true, "enable containerd worker")
flag.StringVar(&opt.containerd, "containerd", "v1.2.1", "containerd version") flag.StringVar(&opt.containerd, "containerd", "v1.2.7", "containerd version")
flag.StringVar(&opt.runc, "runc", "v1.0.0-rc8", "runc version") flag.StringVar(&opt.runc, "runc", "v1.0.0-rc8", "runc version")
flag.StringVar(&opt.buildkit, "buildkit", "master", "buildkit version") flag.StringVar(&opt.buildkit, "buildkit", "master", "buildkit version")
flag.Parse() flag.Parse()

View File

@ -43,7 +43,7 @@ func run() error {
_ = buildkitd _ = buildkitd
containerd, err := gb.BuildExe(gobuild.BuildOpt{ containerd, err := gb.BuildExe(gobuild.BuildOpt{
Source: llb.Git("github.com/containerd/containerd", "v1.2.1"), Source: llb.Git("github.com/containerd/containerd", "v1.2.7"),
MountPath: "/go/src/github.com/containerd/containerd", MountPath: "/go/src/github.com/containerd/containerd",
Pkg: "github.com/containerd/containerd/cmd/containerd", Pkg: "github.com/containerd/containerd/cmd/containerd",
BuildTags: []string{"no_btrfs"}, BuildTags: []string{"no_btrfs"},

View File

@ -1,7 +1,7 @@
ARG RUNC_VERSION=v1.0.0-rc8 ARG RUNC_VERSION=v1.0.0-rc8
ARG CONTAINERD_VERSION=v1.2.1 ARG CONTAINERD_VERSION=v1.2.7
# containerd v1.0 for integration tests # containerd v1.1 for integration tests
ARG CONTAINERD10_VERSION=v1.0.3 ARG CONTAINERD11_VERSION=v1.1.7
# available targets: buildkitd, buildkitd.oci_only, buildkitd.containerd_only # available targets: buildkitd, buildkitd.oci_only, buildkitd.containerd_only
ARG BUILDKIT_TARGET=buildkitd ARG BUILDKIT_TARGET=buildkitd
ARG REGISTRY_VERSION=v2.7.0-rc.0 ARG REGISTRY_VERSION=v2.7.0-rc.0
@ -61,10 +61,10 @@ RUN git checkout -q "$CONTAINERD_VERSION" \
&& make bin/containerd-shim \ && make bin/containerd-shim \
&& make bin/ctr && make bin/ctr
# containerd v1.0 for integration tests # containerd v1.1 for integration tests
FROM containerd-base as containerd10 FROM containerd-base as containerd11
ARG CONTAINERD10_VERSION ARG CONTAINERD11_VERSION
RUN git checkout -q "$CONTAINERD10_VERSION" \ RUN git checkout -q "$CONTAINERD11_VERSION" \
&& make bin/containerd \ && make bin/containerd \
&& make bin/containerd-shim && make bin/containerd-shim
@ -104,10 +104,10 @@ RUN apk add --no-cache shadow shadow-uidmap sudo \
&& echo "XDG_RUNTIME_DIR=/run/user/1000; export XDG_RUNTIME_DIR" >> /home/user/.profile \ && echo "XDG_RUNTIME_DIR=/run/user/1000; export XDG_RUNTIME_DIR" >> /home/user/.profile \
&& mkdir -m 0700 -p /run/user/1000 \ && mkdir -m 0700 -p /run/user/1000 \
&& chown -R user /run/user/1000 /home/user && chown -R user /run/user/1000 /home/user
ENV BUILDKIT_INTEGRATION_CONTAINERD_EXTRA="containerd-1.0=/opt/containerd-1.0/bin" ENV BUILDKIT_INTEGRATION_CONTAINERD_EXTRA="containerd-1.1=/opt/containerd-1.1/bin"
COPY --from=runc /usr/bin/runc /usr/bin/buildkit-runc COPY --from=runc /usr/bin/runc /usr/bin/buildkit-runc
COPY --from=containerd /go/src/github.com/containerd/containerd/bin/containerd* /usr/bin/ COPY --from=containerd /go/src/github.com/containerd/containerd/bin/containerd* /usr/bin/
COPY --from=containerd10 /go/src/github.com/containerd/containerd/bin/containerd* /opt/containerd-1.0/bin/ COPY --from=containerd11 /go/src/github.com/containerd/containerd/bin/containerd* /opt/containerd-1.1/bin/
COPY --from=buildctl /usr/bin/buildctl /usr/bin/ COPY --from=buildctl /usr/bin/buildctl /usr/bin/
COPY --from=buildkitd /usr/bin/buildkitd /usr/bin COPY --from=buildkitd /usr/bin/buildkitd /usr/bin
COPY --from=registry /bin/registry /usr/bin COPY --from=registry /bin/registry /usr/bin

View File

@ -1,9 +1,9 @@
# syntax = docker/dockerfile:1.1-experimental # syntax = docker/dockerfile:1.1-experimental
ARG RUNC_VERSION=v1.0.0-rc8 ARG RUNC_VERSION=v1.0.0-rc8
ARG CONTAINERD_VERSION=v1.2.1 ARG CONTAINERD_VERSION=v1.2.7
# containerd v1.0 for integration tests # containerd v1.1 for integration tests
ARG CONTAINERD10_VERSION=v1.0.3 ARG CONTAINERD11_VERSION=v1.1.7
# available targets: buildkitd, buildkitd.oci_only, buildkitd.containerd_only # available targets: buildkitd, buildkitd.oci_only, buildkitd.containerd_only
ARG BUILDKIT_TARGET=buildkitd ARG BUILDKIT_TARGET=buildkitd
ARG REGISTRY_VERSION=v2.7.0-rc.0 ARG REGISTRY_VERSION=v2.7.0-rc.0
@ -146,12 +146,12 @@ RUN --mount=from=containerd-src,src=/usr/src/containerd,readwrite --mount=target
&& make bin/ctr \ && make bin/ctr \
&& mv bin /out && mv bin /out
# containerd v1.0 for integration tests # containerd v1.1 for integration tests
FROM containerd-base as containerd10 FROM containerd-base as containerd11
ARG CONTAINERD10_VERSION ARG CONTAINERD11_VERSION
RUN --mount=from=containerd-src,src=/usr/src/containerd,readwrite --mount=target=/root/.cache,type=cache \ RUN --mount=from=containerd-src,src=/usr/src/containerd,readwrite --mount=target=/root/.cache,type=cache \
git fetch origin \ git fetch origin \
&& git checkout -q "$CONTAINERD10_VERSION" \ && git checkout -q "$CONTAINERD11_VERSION" \
&& make bin/containerd \ && make bin/containerd \
&& make bin/containerd-shim \ && make bin/containerd-shim \
&& mv bin /out && mv bin /out
@ -218,9 +218,9 @@ RUN apt-get install -y --no-install-recommends uidmap sudo vim iptables \
&& chown -R user /run/user/1000 /home/user \ && chown -R user /run/user/1000 /home/user \
&& update-alternatives --set iptables /usr/sbin/iptables-legacy && update-alternatives --set iptables /usr/sbin/iptables-legacy
# musl is needed to directly use the registry binary that is built on alpine # musl is needed to directly use the registry binary that is built on alpine
ENV BUILDKIT_INTEGRATION_CONTAINERD_EXTRA="containerd-1.0=/opt/containerd-1.0/bin" ENV BUILDKIT_INTEGRATION_CONTAINERD_EXTRA="containerd-1.1=/opt/containerd-1.1/bin"
COPY --from=rootlesskit /rootlesskit /usr/bin/ COPY --from=rootlesskit /rootlesskit /usr/bin/
COPY --from=containerd10 /out/containerd* /opt/containerd-1.0/bin/ COPY --from=containerd11 /out/containerd* /opt/containerd-1.1/bin/
COPY --from=registry /bin/registry /usr/bin COPY --from=registry /bin/registry /usr/bin
COPY --from=runc /usr/bin/runc /usr/bin COPY --from=runc /usr/bin/runc /usr/bin
COPY --from=containerd /out/containerd* /usr/bin/ COPY --from=containerd /out/containerd* /usr/bin/

View File

@ -21,7 +21,7 @@ func InitContainerdWorker() {
containerdShim: "containerd-shim", containerdShim: "containerd-shim",
}) })
// defined in hack/dockerfiles/test.Dockerfile. // defined in hack/dockerfiles/test.Dockerfile.
// e.g. `containerd-1.0=/opt/containerd-1.0/bin,containerd-42.0=/opt/containerd-42.0/bin` // e.g. `containerd-1.1=/opt/containerd-1.1/bin,containerd-42.0=/opt/containerd-42.0/bin`
if s := os.Getenv("BUILDKIT_INTEGRATION_CONTAINERD_EXTRA"); s != "" { if s := os.Getenv("BUILDKIT_INTEGRATION_CONTAINERD_EXTRA"); s != "" {
entries := strings.Split(s, ",") entries := strings.Split(s, ",")
for _, entry := range entries { for _, entry := range entries {