Uh oh!
There was an error while loading. Please reload this page.
build: allow external Dockerfile on remote context - #994
Conversation
corhere
commented
Mar 9, 2022
thaJeztah
commented
Mar 9, 2022
nice!! thank you for working on this! |
thaJeztah
commented
Apr 1, 2022
@tonistiigi PTAL |
tonistiigi
commented
Apr 1, 2022
(no specific issue, just want to make sure I review this before we merge) |
tonistiigi
commented
May 12, 2022
This is currently breaking: while the current version works fine. I think the definition of What we can support are cases like: |
thaJeztah
commented
May 12, 2022
I think for this case; In the classic builder we implicitly changed the path to |
tonistiigi
commented
May 12, 2022
@thaJeztah I don't understand but the command above works in legacy builder as well. |
thaJeztah
commented
May 12, 2022
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 <<-EOFFROM ubuntu:18.04RUN apt-get update && apt-get install -y gcc makeRUN mkdir /src/WORKDIR /src/COPY . .RUN makeEOF |
If I'm understanding it correctly, the desired behavior is that the
|
tonistiigi
commented
May 12, 2022
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 <csnider@mirantis.com>
a290f73 to
ca35076Compare
Support Dockerfile from stdin
or a local filewith remote contexts. Fixesmoby/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.