-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Additional build contexts should be sent as additional tar files #23433
Comments
AFAIK buildkit/buildx uses a reverse API where they turn the client into a server and then the actual remote server just asks the client for the files it needs. Which well is much better as only files actually needed are transferred but ff course this is much more complex and requires many API changes. And AFAIK they use some grpc client so this is anything but simple. |
You can use the Then it will support all the buildx features. Maybe this can be an option* in * similar to docker-compose vs. podman-compose
|
Seems reasonable. |
It would still be nice to fix the feature in buildah ( The only implementation detail would be that buildx needs a
It works fine to save the output into a file, or to pipe it straight into |
A friendly reminder that this issue had no activity for 30 days. |
Feature request description
Option
--build-context <label>=<context-path>
of thepodman build
command allows to specify additional build contexts. The podman client doesn't send these additional build contexts as tar files in the current implementation. Only the main build context is sent.Since podman doesn't send the build contexts to the remote machine, and only passes its local path as an API parameter, the build usually fails because the context path doesn't exist in the remote machine. It only works in the cases where the build context path is mounted, on the same path, in the remote machine. But in the general case, it doesn't.
Suggest potential solution
A reasonable way to resolve the problem is to transfer every additional build context as a tar file. And change the build HTTP request content to be multi-part. However, we should investigate how Docker handles that, as it's not part of the core engine API (additional build contexts are a
buildx
feature). So, we should look at how a Docker client handles it and work on a compatible solution.Have you considered any alternatives?
On Windows and macOS the problem is mitigated by mounting, in the remote machine,
$HOME
and other system folders. But if the user overrides the default machine mounts, the machine is in a remote machine etc...thepodman build
command will still fail.Additional context
--build-context
on macOS and remote #14453additionalBuildContext
in builds via--build-context
buildah#3978cache
explicitly with--squash-all
using--layers
#14320podman build
with option--build-context
on Hyper-V #23429The text was updated successfully, but these errors were encountered: