diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a2a79d91b..358037c02 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -60,8 +60,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max context: . - build-args: - - FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}" + build-args: FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}" target: monolith platforms: ${{ env.PLATFORMS }} push: true @@ -89,8 +88,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max context: . - build-args: - - FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}" + build-args: FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}" target: monolith platforms: ${{ env.PLATFORMS }} push: true @@ -142,8 +140,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max context: . - build-args: - - FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}" + build-args: FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}" target: polylith platforms: ${{ env.PLATFORMS }} push: true @@ -237,8 +234,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max context: . - build-args: - - FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}" + build-args: FLAGS="-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}" target: demo-pinecone platforms: ${{ env.PLATFORMS }} push: true diff --git a/Dockerfile b/Dockerfile index 2f1686672..4cdcd40e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,8 @@ FROM alpine:latest AS dendrite-base 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." RUN addgroup dendrite && adduser dendrite -G dendrite -u 1337 -D USER dendrite WORKDIR /home/dendrite @@ -76,6 +78,7 @@ EXPOSE 8008 8448 # Builds the Complement image, used for integration tests # FROM base AS complement +LABEL org.opencontainers.image.title="Dendrite (Complement)" RUN apk add --no-cache sqlite openssl ca-certificates COPY --from=build /out/* /usr/bin/ RUN rm /usr/bin/dendrite-polylith-multi /usr/bin/dendrite-demo* /usr/bin/dendritejs-pinecone diff --git a/build/docker/README.md b/build/docker/README.md index 340e83a40..14a9c8594 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -10,7 +10,8 @@ They can be found on Docker Hub: ## Dockerfiles The `Dockerfile` is a multistage file which can build all three Dendrite -images depending on the supplied `--target`: +images depending on the supplied `--target`. From the root of the Dendrite +repository, run: ``` docker build . --target monolith -t matrixdotorg/dendrite-monolith