-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Switching to use buildx to build docker images #4508
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ ifneq ($(NO_PROXY),) | |
DOCKER_BUILD_FLAGS+=--build-arg 'NO_PROXY=$(NO_PROXY)' | ||
endif | ||
|
||
DOCKER_BUILD ?= docker build --force-rm | ||
DOCKER_BUILD ?= docker buildx build --force-rm | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried this, but I get an error: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @denyeart it suppose to work, see here: https://docs.docker.com/engine/reference/commandline/buildx_build/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes I'm using
I'm still not seeing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This works for me:
|
||
DBUILD = $(DOCKER_BUILD) $(DOCKER_BUILD_FLAGS) | ||
|
||
DOCKER_NS ?= hyperledger | ||
|
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.
When building FABRIC_VER (e.g.
3.0.0
) image, a prior FABRIC_VER3.0.0
will not exist in the registry yet. So I'm not understanding how the cache would work. Can you explain?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.
First, time it won't have, while once pushed, the rest of the builds will utilize cached layers if no changes have been made to the layers. Here some more details: https://lipanski.com/posts/speed-up-your-docker-builds-with-cache-from
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.
Well, as a matter of fact, I wanted to see whether enabling cache is worth it.