From 824a5c0c22de423c39867e2817c689b90ee44484 Mon Sep 17 00:00:00 2001 From: Adrien le Maire Date: Sun, 31 Jan 2021 12:10:27 +0000 Subject: [PATCH] Update dendrite/Dockerfile, dendrite/Makefile files --- dendrite/Dockerfile | 7 ++++--- dendrite/Makefile | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dendrite/Dockerfile b/dendrite/Dockerfile index 8827599..af87268 100644 --- a/dendrite/Dockerfile +++ b/dendrite/Dockerfile @@ -1,9 +1,10 @@ FROM golang:buster as builder ARG DEBIAN_FRONTEND=noninteractive -COPY dendrite /dendrite -WORKDIR /dendrite -RUN rm -rf .git && ./build.sh +ARG VERSION +WORKDIR / +RUN git clone -b v${VERSION} --depth 1 https://github.com/matrix-org/dendrite.git && \ + cd dendrite && rm -rf .git && ./build.sh FROM debian:buster-20210111-slim diff --git a/dendrite/Makefile b/dendrite/Makefile index f96ab23..b216b1f 100644 --- a/dendrite/Makefile +++ b/dendrite/Makefile @@ -3,13 +3,13 @@ include version IMAGE=dendrite -nopush: git-clone +nopush: docker buildx build --platform linux/amd64 --load \ --build-arg VERSION=$(VERSION) \ --tag ${NAMESPACE}/${IMAGE}:$(VERSION) \ --tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) . -push: git-clone +push: docker buildx build --platform linux/amd64,linux/arm64 --push \ --build-arg VERSION=$(VERSION) \ --cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \