Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Use BuildKit for all images #229

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

slonopotamus
Copy link
Collaborator

BuildKit offers much shorter build times


This is a somewhat controversial change. On one hand, BuildKit severely improves build times. On the other hand, there are reasons why BuildKit is still not enabled by default in Docker.

Some numbers:

Linux
HDD
Ryzen 3700X
ue4-minimal only (ue4-source is already pre-built)
4.20.3
Flags: --exclude debug --exclude ddc --no-engine --no-full

DOCKER_BUILDKIT=1 1h 6m
DOCKER_BUILDKIT=0 1h 27m

BuildKit offers much shorter build times
@slonopotamus slonopotamus changed the title Use BuildKit for all images RFC: Use BuildKit for all images Mar 11, 2022
@TBBle
Copy link
Collaborator

TBBle commented Mar 11, 2022

Since we turn it on magically in some circumstance, it makes sense to me to enable it always.

We lose the ability to diagnose build issues using the intermediate layers as images, but I guess that's mostly a tool we've used on WIndows due to filesize issues, where this won't work until we have BuildKit for Windows Containers anyway.

Docker 21.xx will have BuildKit as default on Linux anyway (when run from the docker CLI), according to docker/cli#3314. With DOCKER_BUILDKIT=1 set, fallback to the classic builder in the case of missing buildx plugin will be blocked, so this change still makes sense to require BuildKit.

For other readers, "reasons why BuildKit is still not enabled by default in Docker": moby/moby#40379 discusses the differences in features and behaviour.

@slonopotamus
Copy link
Collaborator Author

Okay, let's merge then. If we later understand that this makes us/users less happy, we can always revert this.

@slonopotamus slonopotamus merged commit c0406a5 into adamrehn:master Mar 22, 2022
@slonopotamus slonopotamus deleted the builkit-everywhere branch March 22, 2022 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants