aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
author0x1a8510f2 <admin@0x1a8510f2.space>2022-11-03 08:37:58 +0000
committerGitHub <noreply@github.com>2022-11-03 08:37:58 +0000
commit1fcbb9b5e5b7791c50be437c20d73d973b2b78ee (patch)
tree0b32bf9f73c8a290d38eb5c6e76ba335bd9d8688 /Dockerfile
parent85d740ea1b2a84114ef0563c109c98a7b6c7ef25 (diff)
Fix workdir in Dockerfile (and make it a volume) (#2852)
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 007d985b..e09cc2be 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -33,7 +33,6 @@ LABEL org.opencontainers.image.documentation="https://matrix-org.github.io/dendr
LABEL org.opencontainers.image.vendor="The Matrix.org Foundation C.I.C."
RUN addgroup dendrite && adduser dendrite -G dendrite -u 1337 -D
USER dendrite
-WORKDIR /home/dendrite
#
# Builds the polylith image and only contains the polylith binary
@@ -43,6 +42,9 @@ 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"]
#
@@ -56,6 +58,9 @@ 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
+VOLUME /etc/dendrite
+WORKDIR /etc/dendrite
+
ENTRYPOINT ["/usr/bin/dendrite-monolith-server"]
EXPOSE 8008 8448
@@ -119,4 +124,4 @@ EXPOSE 8008 8448
CMD /usr/bin/generate-keys --server $SERVER_NAME --tls-cert server.crt --tls-key server.key --tls-authority-cert /ca/ca.crt --tls-authority-key /ca/ca.key && \
/usr/bin/generate-config -server $SERVER_NAME --ci > dendrite.yaml && \
cp /ca/ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates && \
- /usr/bin/dendrite-monolith-server --really-enable-open-registration --tls-cert server.crt --tls-key server.key --config dendrite.yaml -api=${API:-0} \ No newline at end of file
+ /usr/bin/dendrite-monolith-server --really-enable-open-registration --tls-cert server.crt --tls-key server.key --config dendrite.yaml -api=${API:-0}