mirror of
https://github.com/containers/podman.git
synced 2025-11-28 17:18:58 +08:00
quadlet: add HttpProxy option for Container sections
Add support for HttpProxy key in quadlet Container sections to control proxy environment variable inheritance during image pulls and builds. - HttpProxy=true enables proxy inheritance (default podman behavior) - HttpProxy=false disables proxy inheritance - When omitted, uses podman's default behavior This addresses the need for declarative proxy configuration in IPv6-only networks and other scenarios where proxy settings need to be controlled at the container level without manual workarounds. Fixes #26925 Signed-off-by: Ondřej Gajdušek <ogajduse@redhat.com>
This commit is contained in:
@@ -109,6 +109,7 @@ const (
|
||||
KeyHealthStartupTimeout = "HealthStartupTimeout"
|
||||
KeyHealthTimeout = "HealthTimeout"
|
||||
KeyHostName = "HostName"
|
||||
KeyHttpProxy = "HttpProxy"
|
||||
KeyImage = "Image"
|
||||
KeyImageTag = "ImageTag"
|
||||
KeyInterfaceName = "InterfaceName"
|
||||
@@ -274,6 +275,7 @@ var (
|
||||
KeyHealthStartupTimeout: true,
|
||||
KeyHealthTimeout: true,
|
||||
KeyHostName: true,
|
||||
KeyHttpProxy: true,
|
||||
KeyIP6: true,
|
||||
KeyIP: true,
|
||||
KeyImage: true,
|
||||
@@ -676,6 +678,7 @@ func ConvertContainer(container *parser.UnitFile, isUser bool, unitsInfoMap map[
|
||||
boolKeys := map[string]string{
|
||||
KeyRunInit: "--init",
|
||||
KeyEnvironmentHost: "--env-host",
|
||||
KeyHttpProxy: "--http-proxy",
|
||||
KeyReadOnlyTmpfs: "--read-only-tmpfs",
|
||||
}
|
||||
lookupAndAddBoolean(container, ContainerGroup, boolKeys, podman)
|
||||
|
||||
Reference in New Issue
Block a user