-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature: Improve Docker Module Build Speed #221
Comments
Investigation NotesWe looked into a number of opportunities to see how to improve build times, especially on CI where we use multi-architecture builds. Some high level results using the
Additionally, if the As such, we are looking at a first increment of build improvements that uses the following configuration:
Initial results with this approach show the nearly 4 hour CI build time down to a still long, but much more manageable ~2 hours. Certainly more to improve upon, but this should get us well back towards more reasonable operations. |
…general-docker/airflow.docker.file.vm Co-authored-by: Emily Wilkins <[email protected]>
Co-authored-by: Emily Wilkins <[email protected]>
Co-authored-by: Emily Wilkins <[email protected]>
Co-authored-by: Emily Wilkins <[email protected]>
Test steps passed. |
Description
Upon migrating from orphedomos to fabric8's docker-maven-plugin, docker module build speed has increased substantially (+2.5 hours). Both approaches leverage Docker buildx/buildkit. We need to look at the next level of information to determine what is slowing these modules down and how the situation can be improved.
DOD
There are two primary reasons the build has slowed down post-migration:
default
driver, whereas fabric8 is executing buildx via thedocker-container
driver. This change means a lot of extra I/O time to transfer files and docker layers to and from thedocker-container
driver. Currently, there is no way for fabric8 to execute thedefault
driver without using the basic build. Unfortunately, this has some negative side effects:docker-container
driver. For the non-native architecture, this is very slow.Several opportunities exist to improve things, but they will not all be handled in this ticket. We'll look to shave off some time and then regroup to see what makes sense after letting those changes bake in a bit and be used by the team. A second or third ticket is expected.
ci
build profile. This allows the builds forarm64
andamd64
to happen simultaneously rather than in sequentially, speeding things up around 40%.cacheTo
andcacheFrom
functionality in buildx using the local cache to start (avoiding I/O with remote servers)default
driver buildx docker builds for local execution with better debugging and visibility into what is going on.Future ideas that may be worth exploring:
kubernetes
drvier to allow each docker build to happen on native machinesTest Strategy/Script
Build Time Changes
The text was updated successfully, but these errors were encountered: