Skip to content

Commit

Permalink
feat: 适配 runc v1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai committed Dec 16, 2024
1 parent 70517cc commit cf68415
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
rm -rf common.mk docker*
sed -i "s@DOCKER_VERSION=.*@DOCKER_VERSION=${DOCKER_VERSION}@g" build-docker.sh
sed -i "s@ARG GO_VERSION=.*@ARG GO_VERSION=${GO_VERSION}@" binaries/Dockerfile
# sed -i "s@ARG RUNC_VERSION=.*@ARG RUNC_VERSION=${RUNC_VERSION}@" binaries/Dockerfile
sed -i "s@ARG RUNC_VERSION=.*@ARG RUNC_VERSION=${RUNC_VERSION}@" binaries/Dockerfile
sed -i "s@ARG CONTAINERD_VERSION=.*@ARG CONTAINERD_VERSION=${CONTAINERD_VERSION}@" binaries/Dockerfile
sed -i "s@ARG DOCKER_VERSION=.*@ARG DOCKER_VERSION=${DOCKER_VERSION}@" binaries/Dockerfile
sed -i "s@ARG TINI_VERSION=.*@ARG TINI_VERSION=${TINI_VERSION}@" binaries/Dockerfile
Expand Down
16 changes: 9 additions & 7 deletions binaries/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
ARG GO_VERSION=1.21.10
ARG GO_VERSION=1.23.4

FROM ghcr.io/loong64/golang:${GO_VERSION}-trixie AS builder

ARG RUNC_VERSION=v1.1.14
ARG CONTAINERD_VERSION=v1.7.18
ARG DOCKER_VERSION=v27.0.1
ARG RUNC_VERSION=v1.2.2
ARG CONTAINERD_VERSION=v1.7.24
ARG DOCKER_VERSION=v27.4.0
ARG TINI_VERSION=v0.19.0

RUN set -ex; \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime; \
apt-get update; \
apt-get install -y wget g++ cmake make pkg-config git libseccomp-dev libbtrfs-dev libseccomp-dev libbtrfs-dev libdevmapper-dev; \
apt-get install -y wget g++ cmake make pkg-config git libseccomp-dev libbtrfs-dev libdevmapper-dev; \
rm -rf /var/lib/apt/lists/*

WORKDIR /go/src/github.com/opencontainers
RUN set -ex; \
git clone -b ${RUNC_VERSION} https://github.com/opencontainers/runc --depth=1

WORKDIR /go/src/github.com/opencontainers/runc
RUN sed -i 's@|| s390x@|| s390x || loong64@g' libcontainer/system/syscall_linux_64.go; \
sed -i 's@riscv64 s390x@riscv64 s390x loong64@g' libcontainer/system/syscall_linux_64.go; \
RUN set -ex; \
curl -sSL "https://git.altlinux.org/tasks/archive/done/_352/361175/gears/100/git?p=git;a=blob_plain;f=.gear/runc-alt-libcontainer-loongarch64-support.patch;hb=ff0eabdba6265ddb4aa20d39f4a0ade5e59790f4" | git apply; \
go get -u github.com/seccomp/[email protected]; \
go mod vendor; \
sed -i 's@--dirty @@g' Makefile; \
make static; \
./runc -v
Expand Down

0 comments on commit cf68415

Please sign in to comment.