Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Call out buildkit is required when building test docker images #13338

Merged
merged 4 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/13338.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Mention that BuildKit is needed when building Docker images for tests.
4 changes: 4 additions & 0 deletions docker/README-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/),
babolivier marked this conversation as resolved.
Show resolved Hide resolved
therefore BuildKit needs to be enabled when calling `docker build`. This can be done by
setting `DOCKER_BUILDKIT=1` in your environment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think BuildKit is required to build the base docker image too, not just the testing images? (See #11691.) If so, should we prepend DOCKER_BUILDKIT=1 to the invocations below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think BuildKit is required to build the base docker image too, not just the testing images?

As per #13319 it's possible to get to this point without buildkit because you can build the test image based on the one available in docker hub.

If so, should we prepend DOCKER_BUILDKIT=1 to the invocations below?

I'm not sure I how this is a consequence of the base image needing buildkit. As mentioned by the PR description, I considered prepending DOCKER_BUILDKIT=1 to all docker build calls but since there are more ways to enable buildkit than setting the environment variable I figured it would be more complete to not do that.

Copy link
Contributor

@DMRobertson DMRobertson Jul 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, re-reading #13319 (comment) this makes more sense.

I think my confusion is due to this image being unclear. There are three images (base, workers, complement) and it's not clear which needs buildkit---all three?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right yes, sorry about the typo!

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:
Expand Down