mirror of
https://gitlab.com/alemaire/buildx.git
synced 2025-01-10 18:43:29 +00:00
add dendrite
This commit is contained in:
parent
bdd09a39bb
commit
f561591cc7
14
dendrite/Dockerfile
Normal file
14
dendrite/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM golang:buster as builder
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
COPY dendrite /dendrite
|
||||
WORKDIR /dendrite
|
||||
RUN ./build.sh
|
||||
|
||||
FROM debian:buster
|
||||
|
||||
COPY --from=builder /dendrite/bin/ /usr/local/bin/
|
||||
COPY --from=builder /dendrite/dendrite-config.yaml /usr/local/share/
|
||||
COPY entrypoint.sh /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
21
dendrite/Makefile
Normal file
21
dendrite/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
NAMESPACE=alemairebe
|
||||
include version
|
||||
|
||||
IMAGE=dendrite
|
||||
|
||||
nopush: git-clone
|
||||
docker buildx build --platform linux/amd64 --load \
|
||||
--build-arg VERSION=$(VERSION) \
|
||||
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
|
||||
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .
|
||||
|
||||
push: git-clone
|
||||
docker buildx build --platform linux/amd64,linux/arm64,linux/arm,linux/ppc64le --push \
|
||||
--build-arg VERSION=$(VERSION) \
|
||||
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
|
||||
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
|
||||
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
|
||||
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .
|
||||
|
||||
git-clone:
|
||||
git clone -b v${VERSION} --depth 1 https://github.com/matrix-org/dendrite.git
|
13
dendrite/entrypoint.sh
Executable file
13
dendrite/entrypoint.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -f /usr/local/etc/dendrite.yaml ]; then
|
||||
cp /usr/local/share/dendrite-config.yaml /usr/local/etc/dendrite.yaml
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/local/etc/matrix_key.pem ]; then
|
||||
/usr/local/bin/generate-keys --private-key /usr/local/etc/matrix_key.pem
|
||||
fi
|
||||
|
||||
/usr/local/bin/dendrite-monolith-server --config /usr/local/etc/dendrite.yaml
|
||||
|
||||
|
1
dendrite/version
Normal file
1
dendrite/version
Normal file
@ -0,0 +1 @@
|
||||
VERSION=0.3.5
|
Loading…
Reference in New Issue
Block a user