Add support for RISC-V (#6195)
* Add support for RISC-V Signed-off-by: Antony Chazapis <chazapis@ics.forth.gr> * Use existing Dockerfile with unstable Debian base images for RISC-V Signed-off-by: Antony Chazapis <chazapis@ics.forth.gr> --------- Signed-off-by: Antony Chazapis <chazapis@ics.forth.gr>
This commit is contained in:
parent
a338c25e05
commit
7569d132a1
2 changed files with 7 additions and 3 deletions
|
@ -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
|
LINUX_ARCH:=amd64 arm arm64 mips64le ppc64le s390x riscv64
|
||||||
DOCKER_IMAGE_NAME:=$(DOCKER)/$(NAME)
|
DOCKER_IMAGE_NAME:=$(DOCKER)/$(NAME)
|
||||||
DOCKER_IMAGE_LIST_VERSIONED:=$(shell echo $(LINUX_ARCH) | sed -e "s~[^ ]*~$(DOCKER_IMAGE_NAME):&\-$(VERSION)~g")
|
DOCKER_IMAGE_LIST_VERSIONED:=$(shell echo $(LINUX_ARCH) | sed -e "s~[^ ]*~$(DOCKER_IMAGE_NAME):&\-$(VERSION)~g")
|
||||||
|
|
||||||
|
@ -83,7 +83,11 @@ else
|
||||||
docker version
|
docker version
|
||||||
for arch in $(LINUX_ARCH); do \
|
for arch in $(LINUX_ARCH); do \
|
||||||
cp Dockerfile build/docker/$${arch} ; \
|
cp Dockerfile build/docker/$${arch} ; \
|
||||||
DOCKER_BUILDKIT=1 docker build --platform=$${arch} -t $(DOCKER_IMAGE_NAME):$${arch}-$(VERSION) build/docker/$${arch} ;\
|
DOCKER_ARGS=""; \
|
||||||
|
if [ "$${arch}" = "riscv64" ]; then \
|
||||||
|
DOCKER_ARGS="--build-arg=DEBIAN_IMAGE=debian:unstable-slim --build-arg=BASE=ghcr.io/go-riscv/distroless/static-unstable:nonroot"; \
|
||||||
|
fi; \
|
||||||
|
DOCKER_BUILDKIT=1 docker build --platform=$${arch} -t $(DOCKER_IMAGE_NAME):$${arch}-$(VERSION) $${DOCKER_ARGS} build/docker/$${arch} ;\
|
||||||
done
|
done
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,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
|
LINUX_ARCH:=amd64 arm arm64 mips64le ppc64le s390x mips riscv64
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@echo Use the 'release' target to build a release
|
@echo Use the 'release' target to build a release
|
||||||
|
|
Loading…
Add table
Reference in a new issue