Skip to content

Commit c98cbaa

Browse files
committed
Fix #782: add support for http_proxy
Signed-off-by: ChuJiani <archet@chujiani.top>
1 parent f2f2f15 commit c98cbaa

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

podman_compose.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,8 @@ async def container_to_args(compose, cnt, detached=True):
889889
podman_args.extend(["--annotation", a])
890890
if cnt.get("read_only", None):
891891
podman_args.append("--read-only")
892+
if cnt.get("http_proxy", None) is False:
893+
podman_args.append("--http-proxy=false")
892894
for i in cnt.get("labels", []):
893895
podman_args.extend(["--label", i])
894896
for c in cnt.get("cap_add", []):

pytests/test_container_to_args.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,24 @@ async def test_pid(self):
152152
"busybox",
153153
],
154154
)
155+
156+
async def test_http_proxy(self):
157+
c = create_compose_mock()
158+
159+
cnt = get_minimal_container()
160+
cnt["http_proxy"] = False
161+
162+
args = await container_to_args(c, cnt)
163+
self.assertEqual(
164+
args,
165+
[
166+
"--name=project_name_service_name1",
167+
"-d",
168+
"--http-proxy=false",
169+
"--net",
170+
"",
171+
"--network-alias",
172+
"service_name",
173+
"busybox",
174+
],
175+
)

0 commit comments

Comments
 (0)