mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-13 20:29:35 +00:00
Add support for loading images directly from machine paths to avoid unnecessary file transfers when the image archive is already accessible on the running machine through mounted directories. Changes include: - New /libpod/local/images/load API endpoint for direct machine loading - Machine detection and path mapping functionality - Fallback in tunnel mode to try optimized loading first This optimization significantly speeds up image loading operations when working with remote Podman machines by eliminating redundant file transfers for already-accessible image archives. Fixes: https://issues.redhat.com/browse/RUN-3249 Fixes: https://github.com/containers/podman/issues/26321 Signed-off-by: Jan Rodák <hony.com@seznam.cz>
22 lines
507 B
Go
22 lines
507 B
Go
//go:build amd64 || arm64
|
|
|
|
package main
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"github.com/containers/podman/v5/internal/localapi"
|
|
)
|
|
|
|
func getMachineConn(connectionURI string, parsedConnection *url.URL) (string, error) {
|
|
mc, machineProvider, err := localapi.FindMachineByPort(connectionURI, parsedConnection)
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
|
|
podmanSocket, podmanPipe, err := mc.ConnectionInfo(machineProvider.VMType())
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
return extractConnectionString(podmanSocket, podmanPipe)
|
|
}
|