-
Notifications
You must be signed in to change notification settings - Fork 2.1k
build: print error if BuildKit/non-BuildKit-specific flags are used #2736
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
base: master
Are you sure you want to change the base?
Conversation
|
Pushed a second commit to try integrating it with |
Codecov Report
@@ Coverage Diff @@
## master #2736 +/- ##
==========================================
- Coverage 57.15% 57.13% -0.02%
==========================================
Files 297 297
Lines 18657 18663 +6
==========================================
Hits 10663 10663
- Misses 7132 7136 +4
- Partials 862 864 +2 |
|
opened #2737 to remove the pre-run hack |
silvin-lubecki
left a comment
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.
LGTM 👍
708fbd9 to
8e90caa
Compare
|
Squashed the commits, and rebased on top of #2737 (that one needs to be merged first) |
|
@thaJeztah this PR needs a rebase 🦁 |
With this patch, the `--progress`, `--secret`, `--ssh`, and `--output` flags
trigger an error when trying to use without BuildKit enabled;
DOCKER_BUILDKIT=0 docker build --progress=plain .
--progress is only supported with BuildKit enabled. Enable BuildKit with DOCKER_BUILDKIT=1
DOCKER_BUILDKIT=0 docker build --output=foo .
--output is only supported with BuildKit enabled. Enable BuildKit with DOCKER_BUILDKIT=1
Likewise, options that are not supported yet by BuildKit, now trigger an error:
DOCKER_BUILDKIT=1 docker build --memory=500M .
--memory is not supported with BuildKit enabled. Disable BuildKit with DOCKER_BUILDKIT=0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
8e90caa to
e2986f4
Compare
|
@tiborvass PTAL |
|
The flags marked with |
|
Do you think we should print a warning? e.g. if someone expects to have set memory limits, but they are not applied? |
Codecov Report
@@ Coverage Diff @@
## master #2736 +/- ##
==========================================
- Coverage 57.10% 57.08% -0.02%
==========================================
Files 297 297
Lines 18635 18641 +6
==========================================
Hits 10642 10642
- Misses 7134 7138 +4
- Partials 859 861 +2 |
depends on #2842mergedfixes #2680
implements #1427 (comment)
With this patch, the
--progress,--secret,--ssh, and--outputflagstrigger an error when trying to use without BuildKit enabled;
DOCKER_BUILDKIT=0 docker build --output=foo .
--output is only supported with BuildKit enabled. Enable BuildKit with DOCKER_BUILDKIT=1
Likewise, options that are not supported yet by BuildKit, now trigger an error:
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)