mirror of
https://github.com/coredns/coredns.git
synced 2026-06-05 08:40:11 -04:00
build: add loong64 arch support (#8137)
* build: add loong64 arch support to Makefile.docker and Makefile.release Signed-off-by: 徐晓伟 <xuxiaowei@xuxiaowei.com.cn> * build: add loong64 docker build config using loong64 community images Signed-off-by: 徐晓伟 <xuxiaowei@xuxiaowei.com.cn> --------- Signed-off-by: 徐晓伟 <xuxiaowei@xuxiaowei.com.cn>
This commit is contained in:
@@ -32,7 +32,7 @@ DOCKER:=
|
|||||||
NAME:=coredns
|
NAME:=coredns
|
||||||
GITHUB:=https://github.com/coredns/coredns/releases/download
|
GITHUB:=https://github.com/coredns/coredns/releases/download
|
||||||
# mips is not in LINUX_ARCH because it's not supported by docker manifest. Keep this list in sync with the one in Makefile.release
|
# mips is not in LINUX_ARCH because it's not supported by docker manifest. Keep this list in sync with the one in Makefile.release
|
||||||
LINUX_ARCH:=amd64 arm arm64 mips64le ppc64le s390x riscv64
|
LINUX_ARCH:=amd64 arm arm64 mips64le ppc64le s390x riscv64 loong64
|
||||||
DOCKER_IMAGE_NAME:=$(DOCKER)/$(NAME)
|
DOCKER_IMAGE_NAME:=$(DOCKER)/$(NAME)
|
||||||
DOCKER_IMAGE_LIST_VERSIONED:=$(shell echo $(LINUX_ARCH) | sed -e "s~mips64le ~~g" | sed -e "s~[^ ]*~$(DOCKER_IMAGE_NAME):&\-$(VERSION)~g")
|
DOCKER_IMAGE_LIST_VERSIONED:=$(shell echo $(LINUX_ARCH) | sed -e "s~mips64le ~~g" | sed -e "s~[^ ]*~$(DOCKER_IMAGE_NAME):&\-$(VERSION)~g")
|
||||||
|
|
||||||
@@ -87,6 +87,9 @@ else
|
|||||||
if [ "$${arch}" = "riscv64" ]; then \
|
if [ "$${arch}" = "riscv64" ]; then \
|
||||||
DOCKER_ARGS="--build-arg=DEBIAN_IMAGE=debian:unstable-slim --build-arg=BASE=ghcr.io/go-riscv/distroless/static-unstable:nonroot"; \
|
DOCKER_ARGS="--build-arg=DEBIAN_IMAGE=debian:unstable-slim --build-arg=BASE=ghcr.io/go-riscv/distroless/static-unstable:nonroot"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
if [ "$${arch}" = "loong64" ]; then \
|
||||||
|
DOCKER_ARGS="--build-arg=DEBIAN_IMAGE=ghcr.io/loong64/debian:trixie-slim --build-arg=BASE=ghcr.io/loong64/debian:trixie-slim"; \
|
||||||
|
fi; \
|
||||||
DOCKER_BUILDKIT=1 docker build --platform=$${arch} -t $(DOCKER_IMAGE_NAME):$${arch}-$(VERSION) $${DOCKER_ARGS} build/docker/$${arch} ;\
|
DOCKER_BUILDKIT=1 docker build --platform=$${arch} -t $(DOCKER_IMAGE_NAME):$${arch}-$(VERSION) $${DOCKER_ARGS} build/docker/$${arch} ;\
|
||||||
done
|
done
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ endif
|
|||||||
NAME:=coredns
|
NAME:=coredns
|
||||||
VERSION:=$(shell grep 'CoreVersion' coremain/version.go | awk '{ print $$3 }' | tr -d '"')
|
VERSION:=$(shell grep 'CoreVersion' coremain/version.go | awk '{ print $$3 }' | tr -d '"')
|
||||||
GITHUB:=coredns
|
GITHUB:=coredns
|
||||||
LINUX_ARCH:=amd64 arm arm64 mips64le ppc64le s390x mips riscv64
|
LINUX_ARCH:=amd64 arm arm64 mips64le ppc64le s390x mips riscv64 loong64
|
||||||
GOLANG_VERSION ?= $(shell cat .go-version)
|
GOLANG_VERSION ?= $(shell cat .go-version)
|
||||||
|
|
||||||
export GOSUMDB = sum.golang.org
|
export GOSUMDB = sum.golang.org
|
||||||
|
|||||||
Reference in New Issue
Block a user