Skip to content

Build images using docker buildx bake#321

Merged
nightkr merged 14 commits intomainfrom
spike/local-deps
Feb 8, 2023
Merged

Build images using docker buildx bake#321
nightkr merged 14 commits intomainfrom
spike/local-deps

Conversation

@nightkr
Copy link
Copy Markdown
Contributor

@nightkr nightkr commented Feb 6, 2023

This PR changes the build workflow to generate a Bakefile (https://docs.docker.com/build/bake/), which is then passed to a single docker buildx call. This allows us to refer to other Dockerfiles in the tree directly, rather than having to build every step in the dependency chain manually, updating all the image references in between.

Additionally, this lets Docker build and push multiple the whole tree in parallel, rather than building the images one by one.

Currently Airflow and Zookeeper (and their dependencies) have been updated to take advantage of local dependencies. Other images may not work without updating to the docker/dockerfile:1 syntax. All images have now been updated.

Comment thread conf.py Outdated
Comment thread conf.py
Comment thread conf.py
@nightkr nightkr marked this pull request as ready for review February 6, 2023 14:57
@nightkr
Copy link
Copy Markdown
Contributor Author

nightkr commented Feb 6, 2023

The Hadolint DL3006 warnings are false positives, the stackable/image/ paths are replaced with other in-tree images by Bake, so it is correct that they don't have a version tag.

@nightkr nightkr requested a review from a team February 6, 2023 15:01
razvan
razvan previously approved these changes Feb 7, 2023
Copy link
Copy Markdown
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

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

Nice and elegant. Added some suggestions.

Comment thread build_product_images.py Outdated
Comment thread build_product_images.py Outdated
Comment thread build_product_images.py Outdated
@nightkr nightkr requested a review from razvan February 7, 2023 08:39
razvan
razvan previously approved these changes Feb 7, 2023
Copy link
Copy Markdown
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

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

nice

@nightkr nightkr merged commit 9fa0f5e into main Feb 8, 2023
@nightkr nightkr deleted the spike/local-deps branch February 8, 2023 09:41
@adwk67 adwk67 mentioned this pull request Apr 14, 2023
46 tasks
@Maleware Maleware mentioned this pull request May 25, 2023
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.

4 participants