Workaround for incorrect architecture (#5691)

Signed-off-by: Dreista <Dreista@users.noreply.github.com>
This commit is contained in:
Kumiko as a Service 2022-10-21 10:50:54 -04:00 committed by GitHub
parent 6cb5e10707
commit c6fa91b367
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 8 deletions

View file

@ -36,7 +36,7 @@ buildCoreDNSImage: &buildCoreDNSImage
command: | command: |
cd ~/go/src/${CIRCLE_PROJECT_USERNAME}/coredns cd ~/go/src/${CIRCLE_PROJECT_USERNAME}/coredns
make coredns SYSTEM="GOOS=linux" && \ make coredns SYSTEM="GOOS=linux" && \
docker build -t coredns . && \ DOCKER_BUILDKIT=1 docker build -t coredns . && \
kind load docker-image coredns kind load docker-image coredns
jobs: jobs:

View file

@ -1,4 +1,4 @@
FROM debian:stable-slim FROM --platform=$BUILDPLATFORM debian:stable-slim
SHELL [ "/bin/sh", "-ec" ] SHELL [ "/bin/sh", "-ec" ]
RUN export DEBCONF_NONINTERACTIVE_SEEN=true \ RUN export DEBCONF_NONINTERACTIVE_SEEN=true \
@ -10,7 +10,7 @@ RUN export DEBCONF_NONINTERACTIVE_SEEN=true \
apt-get -yyqq install ca-certificates ; \ apt-get -yyqq install ca-certificates ; \
apt-get clean apt-get clean
FROM scratch FROM --platform=$TARGETPLATFORM scratch
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ADD coredns /coredns ADD coredns /coredns

View file

@ -83,7 +83,7 @@ ifeq ($(DOCKER),)
else else
docker version docker version
for arch in $(LINUX_ARCH); do \ for arch in $(LINUX_ARCH); do \
docker build -t $(DOCKER_IMAGE_NAME):$${arch}-$(VERSION) build/docker/$${arch} ;\ DOCKER_BUILDKIT=1 docker build --platform=$${arch} -t $(DOCKER_IMAGE_NAME):$${arch}-$(VERSION) build/docker/$${arch} ;\
done done
endif endif
@ -102,10 +102,6 @@ else
done done
docker manifest create --amend $(DOCKER_IMAGE_NAME):$(VERSION) $(DOCKER_IMAGE_LIST_VERSIONED) docker manifest create --amend $(DOCKER_IMAGE_NAME):$(VERSION) $(DOCKER_IMAGE_LIST_VERSIONED)
docker manifest create --amend $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_LIST_VERSIONED) docker manifest create --amend $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_LIST_VERSIONED)
for arch in $(LINUX_ARCH); do \
docker manifest annotate --arch $${arch} $(DOCKER_IMAGE_NAME):$(VERSION) $(DOCKER_IMAGE_NAME):$${arch}-$(VERSION) ;\
docker manifest annotate --arch $${arch} $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_NAME):$${arch}-$(VERSION) ;\
done
docker manifest push --purge $(DOCKER_IMAGE_NAME):$(VERSION) docker manifest push --purge $(DOCKER_IMAGE_NAME):$(VERSION)
docker manifest push --purge $(DOCKER_IMAGE_NAME):latest docker manifest push --purge $(DOCKER_IMAGE_NAME):latest
TOKEN=$$(curl -s -H "Content-Type: application/json" -X POST -d "{\"username\":\"$(DOCKER_LOGIN)\",\"password\":\"$(DOCKER_PASSWORD)\"}" "https://hub.docker.com/v2/users/login/" | jq -r .token) ; \ TOKEN=$$(curl -s -H "Content-Type: application/json" -X POST -d "{\"username\":\"$(DOCKER_LOGIN)\",\"password\":\"$(DOCKER_PASSWORD)\"}" "https://hub.docker.com/v2/users/login/" | jq -r .token) ; \