From ca8bc873801c77f67378e542686d19ed388bba53 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 2 Nov 2022 14:04:08 +0000 Subject: Multi-stage Docker builds (#2850) This builds on @S7evinK's work to make multi-stage Docker builds. Now that we can build SQLite without Cgo this should be much simpler and should make Docker builds in CI significantly faster. Co-authored-by: Till Faelligen Co-authored-by: Till Faelligen Co-authored-by: Till Faelligen <2353100+S7evinK@users.noreply.github.com> --- build/docker/README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'build/docker/README.md') diff --git a/build/docker/README.md b/build/docker/README.md index 261519fd..6111b830 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -9,11 +9,16 @@ They can be found on Docker Hub: ## Dockerfiles -The `Dockerfile` builds the base image which contains all of the Dendrite -components. The `Dockerfile.component` file takes the given component, as -specified with `--buildarg component=` from the base image and produce -smaller component-specific images, which are substantially smaller and do -not contain the Go toolchain etc. +The `Dockerfile` is a multistage file which can build all four Dendrite +images depending on the supplied `--target`. From the root of the Dendrite +repository, run: + +``` +docker build . --target monolith -t matrixdotorg/dendrite-monolith +docker build . --target polylith -t matrixdotorg/dendrite-monolith +docker build . --target demo-pinecone -t matrixdotorg/dendrite-demo-pinecone +docker build . --target demo-yggdrasil -t matrixdotorg/dendrite-demo-yggdrasil +``` ## Compose files -- cgit v1.2.3