Skip to content

Add compatMode raw JSON output and fix tls_verify init on pull() #500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions podman/domain/images_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ def pull(
auth_config (Mapping[str, str]) – Override the credentials that are found in the
config for this request. auth_config should contain the username and password
keys to be valid.
compatMode (bool) – Return the same JSON payload as the Docker-compat endpoint.
Default: True.
decode (bool) – Decode the JSON data from the server into dicts.
Only applies with ``stream=True``
platform (str) – Platform in the format os[/arch[/variant]]
Expand Down Expand Up @@ -357,7 +359,8 @@ def pull(

params = {
"reference": repository,
"tlsVerify": kwargs.get("tls_verify"),
"tlsVerify": kwargs.get("tls_verify", True),
"compatMode": kwargs.get("compatMode", True),
}

if all_tags:
Expand Down Expand Up @@ -409,7 +412,7 @@ def pull(
if stream:
return self._stream_helper(response, decode=kwargs.get("decode"))

for item in response.iter_lines():
for item in reversed(list(response.iter_lines())):
obj = json.loads(item)
if all_tags and "images" in obj:
images: List[Image] = []
Expand Down
Loading