Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] update to runc v1.2.0-rc.2 #5157

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile-upstream:master

ARG RUNC_VERSION=v1.1.13
ARG RUNC_VERSION=v1.2.0-rc.2
ARG CONTAINERD_VERSION=v1.7.19
# containerd v1.6 for integration tests
ARG CONTAINERD_ALT_VERSION_16=v1.6.33
Expand Down Expand Up @@ -63,9 +63,22 @@ ARG TARGETPLATFORM
# lld has issues building static binaries for ppc so prefer ld for it
RUN set -e; xx-apk add musl-dev gcc libseccomp-dev libseccomp-static; \
[ "$(xx-info arch)" != "ppc64le" ] || XX_CC_PREFER_LINKER=ld xx-clang --setup-target-triple
RUN --mount=from=runc-src,src=/usr/src/runc,target=. \
RUN --mount=from=runc-src,src=/usr/src/runc,target=. --mount=type=tmpfs,target=libcontainer/dmz/binary \
--mount=target=/root/.cache,type=cache <<EOT
set -ex
if [ -f libcontainer/dmz/_dmz.c ]; then
case "$(xx-info arch)" in
amd64|arm64|s390x|riscv64|386 )
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not quite the same list as https://github.com/opencontainers/runc/blob/v1.2.0-rc.2/libcontainer/dmz/Makefile#L8 but arm & ppc64le give errors to me. Not sure if Alpine, clang or I'm passing some wrong flags.

CFLAGS="-fomit-frame-pointer -fno-unwind-tables -fno-ident -nostdlib -ffunction-sections -fdata-sections -Wl,--gc-sections"
;;
* )
CFLAGS=-DRUNC_USE_STDLIB
;;
esac
xx-clang $CFLAGS -Os -static -Wl,-s -o libcontainer/dmz/binary/runc-dmz libcontainer/dmz/_dmz.c
file libcontainer/dmz/binary/runc-dmz
xx-verify --static libcontainer/dmz/binary/runc-dmz
fi
CGO_ENABLED=1 xx-go build -mod=vendor -ldflags '-extldflags -static' -tags 'apparmor seccomp netgo cgo static_build osusergo' -o /usr/bin/runc ./
xx-verify --static /usr/bin/runc
if [ "$(xx-info os)" = "linux" ]; then /usr/bin/runc --version; fi
Expand Down
Loading