Open Romain-Geissler-1A opened 6 months ago
I don't think this is expected to work, there simply is no API to do this with the service. We would have to completely reinvent a new build API that would allow sending more than one build context which I do not see happening.
Note the this limitation is documented so this isn't a bug
Valid values are:
Local directory – e.g. --build-context project2=../path/to/project2/src (This option is not available with the remote Podman client. On Podman machine setup (i.e macOS and Windows) path must exists on the machine VM)
A friendly reminder that this issue had no activity for 30 days.
I don't think this is expected to work
i'd disagree, I read the docs, saw the noted limitation, was dismayed that it didn't do the exact thing described in this issue.
We would have to completely reinvent a new build API
That seems to overstate the request - copying the build context doesn't seem like a big lift, none of the rest of the api would need to be rewritten or changed. I see this as a request for extension to what is currently in the api. perhaps a sync op of some kind.
I'd love to see this feature added, it would make podman remote clients extremely useful for cross compile setups.
Issue Description
Using
podman build --build-context=name=/path/to/build/context
doesn't work with podman remote. Current podman implementation do expect/path/to/build/context
to be on the machine where podman server is running, while users do expect it to be on the machine where the podman client is (like the "root" build context containing the containerfile which is on the client machine).Since here it's really a podman related issue, not a buildah one, I open this on podman side. The expected behavior would be that the client would create a tarball from the additional build context, send it to libpod via the HTTP API, and on server side podman would extract it in a temporary location, then call buildah with the temporary location.
Steps to reproduce the issue
Steps to reproduce the issue
(Note: if creating the
/additional-client-build-context
resources in the podman server container, "podman build" works).Describe the results you received
The image build fails, as podman server wrongly expect the additional build context to be on the server side.
Describe the results you expected
The image should work, using the build context from the client machine.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
No response