Skip to content

Commit 620ada6

Browse files
committed
Fix build image
1 parent bbb8fba commit 620ada6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

hack/build.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,23 @@ BUILD_PLATFORMS=(
1919
# linux/ppc64le
2020
)
2121

22+
declare -A archToCC
23+
archToCC["amd64"]=""
24+
archToCC["arm64"]="aarch64-linux-gnu-gcc"
25+
archToCC["ppc64le"]="powerpc64le-linux-gnu-gcc"
26+
27+
docker build -t runcdev .
28+
2229
for platform in ${BUILD_PLATFORMS[*]}; do
2330
os="${platform%/*}"
2431
arch="${platform#*/}"
2532
echo "Building ${platform}"
2633
rm -rf ~/.cache/go-build bin || :
2734
rm -rf "_output/${os}/${arch}/runc" || :
2835
mkdir -p "_output/${os}/${arch}/runc"
29-
docker run --rm -v $(pwd):/go/src/github.com/opencontainers/runc -w /go/src/github.com/opencontainers/runc golang:1.17 \
36+
docker run --rm -v $(pwd):/go/src/github.com/opencontainers/runc -w /go/src/github.com/opencontainers/runc runcdev \
3037
/bin/bash -c "
31-
apt-get update && apt-get install libseccomp-dev
32-
GO111MODULE=auto GOOS=${os} GOARCH=${arch} CGO_ENABLED=1 make BUILDTAGS='${BUILDTAGS}' runc && \
38+
GO111MODULE=auto GOOS=${os} GOARCH=${arch} CC=${archToCC[$arch]} CGO_ENABLED=1 make BUILDTAGS='${BUILDTAGS}' runc && \
3339
mv runc _output/${os}/${arch}/runc/ || :
3440
" || echo "fail ${platform}"
3541

0 commit comments

Comments
 (0)