aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-02-14 12:47:47 +0100
committerGitHub <noreply@github.com>2023-02-14 12:47:47 +0100
commit11d9b9db0e96c51c1430d451d23cf5ae9f36e4ee (patch)
treea0837bfa69051295b76140e3940a45fc61854cab /Dockerfile
parentcc59879faa57cac043cf5f1585773b301994bebf (diff)
Remove polylith/API mode (#2967)
This removes most of the code used for polylith/API mode. This removes the `/api` internal endpoints entirely. Binary size change roughly 5%: ``` 51437560 Feb 13 10:15 dendrite-monolith-server # old 48759008 Feb 13 10:15 dendrite-monolith-server # new ```
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile31
1 files changed, 7 insertions, 24 deletions
diff --git a/Dockerfile b/Dockerfile
index 6da555c0..2487ea5b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,7 +3,7 @@
#
# base installs required dependencies and runs go mod download to cache dependencies
#
-FROM --platform=${BUILDPLATFORM} docker.io/golang:1.19-alpine AS base
+FROM --platform=${BUILDPLATFORM} docker.io/golang:1.20-alpine AS base
RUN apk --update --no-cache add bash build-base curl
#
@@ -23,44 +23,27 @@ RUN --mount=target=. \
CGO_ENABLED=$([ "$TARGETARCH" = "$USERARCH" ] && echo "1" || echo "0") \
go build -v -ldflags="${FLAGS}" -trimpath -o /out/ ./cmd/...
+
#
-# The dendrite base image
+# Builds the Dendrite image containing all required binaries
#
-FROM alpine:latest AS dendrite-base
+FROM alpine:latest
RUN apk --update --no-cache add curl
+LABEL org.opencontainers.image.title="Dendrite"
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"
LABEL org.opencontainers.image.documentation="https://matrix-org.github.io/dendrite/"
LABEL org.opencontainers.image.vendor="The Matrix.org Foundation C.I.C."
-#
-# Builds the polylith image and only contains the polylith binary
-#
-FROM dendrite-base AS polylith
-LABEL org.opencontainers.image.title="Dendrite (Polylith)"
-
-COPY --from=build /out/dendrite-polylith-multi /usr/bin/
-
-VOLUME /etc/dendrite
-WORKDIR /etc/dendrite
-
-ENTRYPOINT ["/usr/bin/dendrite-polylith-multi"]
-
-#
-# Builds the monolith image and contains all required binaries
-#
-FROM dendrite-base AS monolith
-LABEL org.opencontainers.image.title="Dendrite (Monolith)"
-
COPY --from=build /out/create-account /usr/bin/create-account
COPY --from=build /out/generate-config /usr/bin/generate-config
COPY --from=build /out/generate-keys /usr/bin/generate-keys
-COPY --from=build /out/dendrite-monolith-server /usr/bin/dendrite-monolith-server
+COPY --from=build /out/dendrite /usr/bin/dendrite
VOLUME /etc/dendrite
WORKDIR /etc/dendrite
-ENTRYPOINT ["/usr/bin/dendrite-monolith-server"]
+ENTRYPOINT ["/usr/bin/dendrite"]
EXPOSE 8008 8448