-
Notifications
You must be signed in to change notification settings - Fork 744
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
DEV: Remove use of --squash
flag and switch to buildx
#743
Conversation
image/auto_build.rb
Outdated
raise "Error building the image for #{image[:name]}: #{lines[-1]}" if lines[-1] =~ /successfully built/ | ||
lines = | ||
run( | ||
"cd #{image[:name]} && docker buildx build . --no-cache --tag #{image[:tag]} #{image[:extra_args] ? image[:extra_args] : ""}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actual change is here. The rest of the changes in this file is just linting due to syntax_tree
.
base_slim_arm64: { | ||
name: "base", | ||
tag: "discourse/base:build_slim_arm64", | ||
extra_args: "-f slim.Dockerfile --platform linux/arm64", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New image added here.
@davidtaylorhq @xfalcox Can I trouble you guys for a review here? Thank you! 🙇 |
I think we could also remove: discourse_docker/.github/workflows/build.yml Lines 21 to 25 in 246f03b
|
5d0766f
to
7d60658
Compare
Why this change? In CI, we are seeing the following warning message: ``` WARNING: experimental flag squash is removed with BuildKit. You should squash inside build using a multi-stage Dockerfile for efficiency. ``` Basically, the `--squash` flag has not been working for quite some time and is redundant. What does this change do? * This change removes the use of the `--squash` flag. * This change uses the `buildx` tool in `auto_build.rb` as we prepare to build images for multiple platforms.
7d60658
to
9a6ec1b
Compare
Thank you for reviewing @davidtaylorhq 👍 |
Why this change?
In CI, we are seeing the following warning message:
Basically, the
--squash
flag has not been working for quite some time and is redundant.What does this change do?
This change removes the use of the
--squash
flag.This change uses the
buildx
tool inauto_build.rb
as we prepare to build images for multiple platforms.