2020-08-20 17:35:04 +00:00
|
|
|
FROM golang:1.13-stretch as build
|
2020-08-28 14:19:47 +00:00
|
|
|
RUN apt-get update && apt-get install -y sqlite3
|
2020-08-20 17:35:04 +00:00
|
|
|
WORKDIR /build
|
|
|
|
|
|
|
|
# Utilise Docker caching when downloading dependencies, this stops us needlessly
|
|
|
|
# downloading dependencies every time.
|
|
|
|
COPY go.mod .
|
|
|
|
COPY go.sum .
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
RUN go build ./cmd/dendrite-monolith-server
|
|
|
|
RUN go build ./cmd/generate-keys
|
|
|
|
RUN go build ./cmd/generate-config
|
2020-09-03 09:12:11 +00:00
|
|
|
RUN ./generate-config --ci > dendrite.yaml
|
2020-08-20 17:35:04 +00:00
|
|
|
RUN ./generate-keys --private-key matrix_key.pem --tls-cert server.crt --tls-key server.key
|
|
|
|
|
|
|
|
ENV SERVER_NAME=localhost
|
|
|
|
EXPOSE 8008 8448
|
|
|
|
|
|
|
|
CMD sed -i "s/server_name: localhost/server_name: ${SERVER_NAME}/g" dendrite.yaml && ./dendrite-monolith-server --tls-cert server.crt --tls-key server.key --config dendrite.yaml
|