chore: build arm/v5 image
parent
6962a4bdc6
commit
45f802ec6f
|
|
@ -18,13 +18,18 @@ RUN <<EOF
|
||||||
git archive --prefix=github.com/zhsj/wghttp@"$tag"/ -o "$file_prefix".zip HEAD
|
git archive --prefix=github.com/zhsj/wghttp@"$tag"/ -o "$file_prefix".zip HEAD
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH TARGETVARIANT
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
set -ex
|
set -ex
|
||||||
export CGO_ENABLED=0
|
export CGO_ENABLED=0
|
||||||
export GOARCH=$TARGETARCH
|
|
||||||
export GOPROXY=file://$(go env GOMODCACHE)/cache/download
|
export GOPROXY=file://$(go env GOMODCACHE)/cache/download
|
||||||
export GOSUMDB=off
|
export GOSUMDB=off
|
||||||
|
export GOARCH="$TARGETARCH"
|
||||||
|
case "$TARGETARCH" in
|
||||||
|
arm|arm64)
|
||||||
|
export GOARM=$(echo "$TARGETVARIANT"|sed 's/^v//')
|
||||||
|
;;
|
||||||
|
esac
|
||||||
tag=$(git describe --tags --abbrev=8 --always)
|
tag=$(git describe --tags --abbrev=8 --always)
|
||||||
go install -trimpath -ldflags="-w -s" github.com/zhsj/wghttp@"$tag"
|
go install -trimpath -ldflags="-w -s" github.com/zhsj/wghttp@"$tag"
|
||||||
cross_bin=/go/bin/$(go env GOOS)_$(go env GOARCH)/wghttp
|
cross_bin=/go/bin/$(go env GOOS)_$(go env GOARCH)/wghttp
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,9 @@ target "build" {
|
||||||
platforms = [
|
platforms = [
|
||||||
"linux/386",
|
"linux/386",
|
||||||
"linux/amd64",
|
"linux/amd64",
|
||||||
"linux/arm",
|
"linux/arm/v5",
|
||||||
"linux/arm64",
|
"linux/arm/v7",
|
||||||
|
"linux/arm64/v8",
|
||||||
"linux/mips",
|
"linux/mips",
|
||||||
"linux/mips64",
|
"linux/mips64",
|
||||||
"linux/mips64le",
|
"linux/mips64le",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue