-
Notifications
You must be signed in to change notification settings - Fork 489
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
build: allow external Dockerfile on remote context #994
build: allow external Dockerfile on remote context #994
Conversation
nice!! thank you for working on this! |
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
@tonistiigi PTAL |
(no specific issue, just want to make sure I review this before we merge) |
This is currently breaking:
while the current version works fine. I think the definition of What we can support are cases like:
|
I think for this case;
In the classic builder we implicitly changed the path to |
@thaJeztah I don't understand but the command above works in legacy builder as well. |
Ah, you're right; I thought it would take the local file (due to Maybe I misunderstood your "I think the definition of -f for such cases needs to remain as is." (I interpreted your comment as "won't fix") So, the issue to fix is "remote context" but file from stdin; so my example from the issue; docker buildx build -t statx --no-cache -f- https://github.com/whotwagner/statx-fun.git <<-EOF
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y gcc make
RUN mkdir /src/
WORKDIR /src/
COPY . .
RUN make
EOF |
If I'm understanding it correctly, the desired behavior is that the
|
If context is a local dir then |
BuildKit has supported external Dockerfile on remote contexts since v0.5.0, included in Moby v19.03.0. The client side was the only missing piece. Signed-off-by: Cory Snider <[email protected]>
a290f73
to
ca35076
Compare
Support Dockerfile from stdin
or a local filewith remote contexts. Fixes moby/moby#38254 now that buildx is the only BuildKit client included in the Docker CLI (docker/cli#3314).Support for external Dockerfile on remote contexts was added to BuildKit in moby/buildkit#947, which is included in the BuildKit v0.5.0 release and first vendored into Moby in moby/moby#39132, included in v19.03.0. The client side was the only missing piece.