main
Ricard Illa 2021-04-13 15:36:59 +02:00
parent bfe291f188
commit 35f024815a
5 changed files with 52 additions and 1 deletions

View File

@ -1,4 +1,4 @@
images=agate archivebox ansible backup buku ddclient git-daemon gitolite gitolite-pystagit rss-bridge pleroma sassc syncthing tasks tor transmission vdirsyncer xandikos
images=agate archivebox ansible backup buku ddclient git-daemon gitolite gitolite-pystagit rss-bridge pleroma sassc syncthing tasks tor transmission vdirsyncer xandikos dendrite
.PHONY: all $(images)
all: $(images)
@ -57,3 +57,6 @@ vdirsyncer:
xandikos:
$(BUILD)
dendrite:
$(BUILD)

View File

@ -23,6 +23,7 @@ useful.
* backup: simple image used in some of my backup daemons
* buku: buku and bukuserver
* ddclient
* dendrite
* git-daemon: for git-daemon and git-http-backend
* gitolite-pystagit: well, gitolite + pystagit
* gitolite: gitolite + docker, so that I can mount the docker socket inside of

33
dendrite/Dockerfile Normal file
View File

@ -0,0 +1,33 @@
FROM golang:1.16.3-alpine3.13 AS builder
RUN apk --no-cache add git build-base && \
mkdir -p /build && \
git clone https://github.com/matrix-org/dendrite /build/dendrite && \
mkdir -p /build/bin && \
cd /build/dendrite && \
go build -trimpath -o /build/bin/ ./cmd/dendrite-monolith-server && \
go build -trimpath -o /build/bin/ ./cmd/goose && \
go build -trimpath -o /build/bin/ ./cmd/create-account && \
go build -trimpath -o /build/bin/ ./cmd/generate-keys
FROM alpine:3.13
COPY --from=builder /build/bin/* /usr/local/bin
COPY entrypoint.sh /usr/local/bin/entrypoint
RUN chmod +x /usr/local/bin/entrypoint && \
addgroup --gid 10001 dendrite && \
adduser \
--uid 10000 \
--home /var/lib/dendrite \
--ingroup dendrite \
--disabled-password \
--shell /sbin/nologin \
dendrite && \
mkdir -p /var/log/dendrite && \
chown -R dendrite:dendrite /var/log/dendrite
WORKDIR /etc/dendrite
USER dendrite
ENTRYPOINT ["/usr/local/bin/entrypoint"]

10
dendrite/Makefile Normal file
View File

@ -0,0 +1,10 @@
USERNAME = rilla
IMG_NAME = dendrite
.PHONY: build build-nc
build: Dockerfile entrypoint.sh
docker build -t $(USERNAME)/$(IMG_NAME) .
build-nc: Dockerfile entrypoint.sh
docker build --no-cache -t $(USERNAME)/$(IMG_NAME) .

4
dendrite/entrypoint.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
sleep 5
exec /usr/local/bin/dendrite-monolith-server -config /etc/dendrite/dendrite.yaml "$@"