-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add BUILDKIT_SANDBOX_HOSTNAME build-arg #2373
Conversation
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.
We should add a test for this. Probably just an extension of the existing hostname test.
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
7564a54
to
e5ecbf9
Compare
Hi @crazy-max Thank you very much for this long-waited feature!
|
It's already vendored on buildx but not yet released. I guess it will be part of the upcoming 0.7.0 of buildx. But you can build it yourself:
|
I tried with master and it didn't work |
I guess you're using the $ docker buildx create --name "builder" --driver "docker-container" --driver-opt "image=moby/buildkit:master" --use And it should work. |
@crazy-max it helped, thank you! |
@crazy-max Thank You! Been waiting for this for a year now |
@crazy-max Are there any plans to do this, such that the default "docker" driver can have this functionality? Otherwise I have to teach my users about creating and using a (I've tried it with Docker Desktop for Mac v4.3.0 which has Buildx v0.7.1, and creating the builder instance with the "docker-container" driver is still necessary.) |
Hi @crazy-max with docker-container in our production we found the issue that cache is not working as expected but with docker driver it works good while hostname customization is missing. |
Below is output with default driver, then with stable and with latest.
|
Hi @crazy-max @tonistiigi Could you help with this issue? |
Hi @crazy-max @tonistiigi |
Fixes docker/buildx#474
Closes docker/buildx#776
Set the hostname based on the
BUILDKIT_SANDBOX_HOSTNAME
build-arg value. Also add documentation around the current available built-in build args and make build-arg const name more consistent.Signed-off-by: CrazyMax crazy-max@users.noreply.github.com