forked from matrix-org/dendrite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.monolith
40 lines (26 loc) · 1.12 KB
/
Dockerfile.monolith
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM docker.io/golang:1.19-alpine AS base
RUN apk --update --no-cache add bash build-base
ARG RELEASE_VERSION="Unreleased"
#### DO NOT UNCOMMENT, THESE ENV VARS ARE FOR DOCUMENTATION PURPOSES ONLY ####
## Run the profiler on port 65432
# ENV PPROFLISTEN 0.0.0.0:65432
WORKDIR /build
# Download necessary Go modules
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY . /build
RUN mkdir -p bin
RUN go build -trimpath -o bin/ -ldflags="-X 'github.com/matrix-org/dendrite/setup/config.ReleaseVersion=$RELEASE_VERSION'" ./cmd/dendrite
RUN go build -trimpath -o bin/ ./cmd/create-account
RUN go build -trimpath -o bin/ ./cmd/generate-keys
FROM alpine:latest
LABEL org.opencontainers.image.title="Dendrite (Monolith)"
LABEL org.opencontainers.image.description="Next-generation Matrix homeserver written in Go"
LABEL org.opencontainers.image.source="https://github.com/matrix-org/dendrite"
LABEL org.opencontainers.image.licenses="Apache-2.0"
COPY --from=base /build/bin/* /usr/bin/
COPY --from=base /build/dendrite-zion.yaml /usr/config/dendrite-zion.yaml
VOLUME /etc/dendrite
WORKDIR /etc/dendrite
ENTRYPOINT ["/usr/bin/dendrite"]