From ea87e89313d4d5f58cd97aa247373c0a8151cd08 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Wed, 20 Jul 2022 15:51:55 +0200 Subject: [PATCH 1/4] Call out buildkit is required when building test images --- docker/README-testing.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/README-testing.md b/docker/README-testing.md index 1f0423f09b91..b128bab733df 100644 --- a/docker/README-testing.md +++ b/docker/README-testing.md @@ -22,6 +22,10 @@ Consult the [contributing guide][guideComplementSh] for instructions on how to u Under some circumstances, you may wish to build the images manually. The instructions below will lead you to doing that. +Note that this image can only be built using [BuildKit](https://docs.docker.com/develop/develop-images/build_enhancements/), +therefore BuildKit needs to be enabled when calling `docker build`. This can be done by +setting `DOCKER_BUILDKIT=1` in your environment. + Start by building the base Synapse docker image. If you wish to run tests with the latest release of Synapse, instead of your current checkout, you can skip this step. From the root of the repository: From 4f0af55469afb1165cf8b6cab1ed2385b97b0980 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Wed, 20 Jul 2022 15:58:13 +0200 Subject: [PATCH 2/4] Changelog --- changelog.d/13338.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/13338.doc diff --git a/changelog.d/13338.doc b/changelog.d/13338.doc new file mode 100644 index 000000000000..7acf6d3f34b0 --- /dev/null +++ b/changelog.d/13338.doc @@ -0,0 +1 @@ +Mention that BuildKit is needed when building Docker images for tests. From 77a468724178722807b8c6d7d7f7abd3a988f6fd Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Thu, 21 Jul 2022 10:23:50 +0200 Subject: [PATCH 3/4] Update docker/README-testing.md Co-authored-by: David Robertson --- docker/README-testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/README-testing.md b/docker/README-testing.md index b128bab733df..21b99963d8b7 100644 --- a/docker/README-testing.md +++ b/docker/README-testing.md @@ -22,7 +22,7 @@ Consult the [contributing guide][guideComplementSh] for instructions on how to u Under some circumstances, you may wish to build the images manually. The instructions below will lead you to doing that. -Note that this image can only be built using [BuildKit](https://docs.docker.com/develop/develop-images/build_enhancements/), +Note that these images can only be built using [BuildKit](https://docs.docker.com/develop/develop-images/build_enhancements/), therefore BuildKit needs to be enabled when calling `docker build`. This can be done by setting `DOCKER_BUILDKIT=1` in your environment. From 643534806b665d585a14e0ea9ba96f0d6804ebf1 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Thu, 21 Jul 2022 12:07:41 +0200 Subject: [PATCH 4/4] Specify Dockerfile syntax --- docker/Dockerfile-workers | 1 + docker/complement/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/docker/Dockerfile-workers b/docker/Dockerfile-workers index 0f1570cfb654..84f836ff7bfc 100644 --- a/docker/Dockerfile-workers +++ b/docker/Dockerfile-workers @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 # Inherit from the official Synapse docker image ARG SYNAPSE_VERSION=latest FROM matrixdotorg/synapse:$SYNAPSE_VERSION diff --git a/docker/complement/Dockerfile b/docker/complement/Dockerfile index c5e7984a2835..3cfff19f9acd 100644 --- a/docker/complement/Dockerfile +++ b/docker/complement/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 # This dockerfile builds on top of 'docker/Dockerfile-workers' in matrix-org/synapse # by including a built-in postgres instance, as well as setting up the homeserver so # that it is ready for testing via Complement.