From 41fd15b9b659bab1220c0a4868a8a478d70b7180 Mon Sep 17 00:00:00 2001 From: stoically Date: Wed, 3 Mar 2021 12:20:40 +0100 Subject: [PATCH] Docker fix and tweak (#1781) * Fix image building with recent docker version * Mount media path in docker to prevent data loss --- build/docker/Dockerfile.monolith | 2 +- build/docker/Dockerfile.polylith | 2 +- build/docker/docker-compose.monolith.yml | 1 + build/docker/docker-compose.polylith.yml | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/docker/Dockerfile.monolith b/build/docker/Dockerfile.monolith index eb099c4c..e59fd087 100644 --- a/build/docker/Dockerfile.monolith +++ b/build/docker/Dockerfile.monolith @@ -14,7 +14,7 @@ RUN go build -trimpath -o bin/ ./cmd/generate-keys FROM alpine:latest -COPY --from=base /build/bin/* /usr/bin +COPY --from=base /build/bin/* /usr/bin/ VOLUME /etc/dendrite WORKDIR /etc/dendrite diff --git a/build/docker/Dockerfile.polylith b/build/docker/Dockerfile.polylith index 1a7ba193..5cb53bbd 100644 --- a/build/docker/Dockerfile.polylith +++ b/build/docker/Dockerfile.polylith @@ -14,7 +14,7 @@ RUN go build -trimpath -o bin/ ./cmd/generate-keys FROM alpine:latest -COPY --from=base /build/bin/* /usr/bin +COPY --from=base /build/bin/* /usr/bin/ VOLUME /etc/dendrite WORKDIR /etc/dendrite diff --git a/build/docker/docker-compose.monolith.yml b/build/docker/docker-compose.monolith.yml index 024183aa..ef8975b9 100644 --- a/build/docker/docker-compose.monolith.yml +++ b/build/docker/docker-compose.monolith.yml @@ -12,6 +12,7 @@ services: - 8448:8448 volumes: - ./config:/etc/dendrite + - ./media:/var/dendrite/media networks: - internal diff --git a/build/docker/docker-compose.polylith.yml b/build/docker/docker-compose.polylith.yml index e95e1957..5174830b 100644 --- a/build/docker/docker-compose.polylith.yml +++ b/build/docker/docker-compose.polylith.yml @@ -15,6 +15,7 @@ services: command: mediaapi volumes: - ./config:/etc/dendrite + - ./media:/var/dendrite/media networks: - internal