Add local build API for direct filesystem builds on MacOS and Windows (only WSL)

Adds /libpod/local/build endpoint, client bindings, and path translation
utilities to enable container builds from mounted directories to podman machine without tar uploads.

This optimization significantly speeds up build operations when working with remote Podman machines by eliminating redundant file transfers for already-accessible files.

Fixes: https://issues.redhat.com/browse/RUN-3249

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
This commit is contained in:
Jan Rodák
2025-09-12 14:30:01 +02:00
parent 685a448ccc
commit a1e7e9a46d
11 changed files with 812 additions and 17 deletions

View File

@@ -30,6 +30,12 @@ func IsLibpodRequest(r *http.Request) bool {
return apiutil.IsLibpodRequest(r)
}
// IsLibpodLocalRequest returns true if the request related to a libpod local endpoint
// (e.g., /v2/libpod/local...).
func IsLibpodLocalRequest(r *http.Request) bool {
return apiutil.IsLibpodLocalRequest(r)
}
// SupportedVersion validates that the version provided by client is included in the given condition
// https://github.com/blang/semver#ranges provides the details for writing conditions
// If a version is not given in URL path, ErrVersionNotGiven is returned