Files
podman/internal/localapi
Jingze Liu ee50ed0681 Keep the client context directory for local files when localapi maps a build
When localapi finds the build context on a running machine's mount it
translated options.ContextDirectory into the machine path. pkg/bindings runs
on the client, and build() still creates files under the context directory
there: the temporary files for --secret, and a Containerfile read from
stdin. On Windows that meant creating "/mnt/c/.../podman-build-secret-*" on
the host, which fails.

Keep options.ContextDirectory as the client path and record the machine path
in a new RemoteContextDirectory field, used only when the local build request
is prepared (the localcontextdir parameter). The Containerfile, additional
build context and ignore file paths are still translated as before; the
server accepts them as absolute machine paths. A caller of
BuildFromServerContext that already passes a machine path leaves the new
field empty and is sent as is.

Add a unit test for the request parameter in both cases.

Fixes: #29223

Translated with an LLM from Chinese.

Signed-off-by: Jingze Liu <110184138+Theodore-Liu@users.noreply.github.com>
2026-09-23 22:00:49 -07:00
..
2025-11-19 18:20:37 +01:00