Bug 2232127

Summary: Podman's `/build` Docker compatibility API endpoint does not accept "1" as a valid pull parameter.
Product: Red Hat Enterprise Linux 8 Reporter: Matej Vašek <mvasek>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: MODIFIED --- QA Contact: atomic-bugs <atomic-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.9CC: ajia, bbaude, dwalsh, jligon, jnovy, lsm5, mboddu, mheon, pthomas, tsweeney
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: jnovy: needinfo? (ajia)
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: podman-4.6.1-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matej Vašek 2023-08-15 13:35:40 UTC
Description of problem:
The `/build` Docker compatibility API endpoint does not accept "1" as a valid pull parameter.

How reproducible:
Always.
Use standard Docker CLI or Golang client against podman implementation of Docker API.

Steps to Reproduce:
```
podman system service unix:///tmp/docker.sock --log-level=debug --time 0 &
export DOCKER_HOST="unix:///tmp/docker.sock"
echo "FROM alpine" >> Dockerfile
docker build . -t my-alpine --pull
```

Actual results:
```
Error response from daemon: failed to parse query parameter 'pull': "1": invalid pull policy: "1"
```

Expected results:
Build proceeds without error.


Additional info:
This affects versions podman 4.6.x
Related issue: https://issues.redhat.com/browse/SRVOCF-550

FIX:
https://github.com/containers/podman/pull/19631/commits/888a52ded8c1ef9ed32b9525b95ee879add411ea

Comment 2 Paul Holzinger 2023-08-15 16:39:27 UTC
https://github.com/containers/podman/pull/19633 is merged, assigning to Jindrich for packaging work