-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
APIv2: images aren't pulled automatically #6960
Comments
Does docker cli send a create container request to service without explicit pull request? Iirc podman currently requires explicit pull request when using API. This is one of many issues that will be fixed when code paths between cli and API (for creating containers) are shared. |
Not unless you specify
|
Doesn't this mean that result is expected when no --pull is defined? However, I do suspect that the pull is implemented is incorrect. Docker documentation hints that it supports hijacking connection for creating images (pulling). This is probably required for reporting download status to client. Podman currently doesn't hijack or wait for completion. Thus client can't possibly know when download has completed (with Success or failed). I suspect that docker hijacks connection and starts publishing progress events when you start pulling. Because implementing pull requires streaming, I thought that it is unlikely that docker would pull image and create container with just single API call. |
I don't see any Given all this I'm fairly certain that Docker behaves the same way we do (requires the image be explicitly pulled first). |
Is the more specific desire here to run |
I'm just running Here's
With the Ok looking at the |
Ahhh. That would explain it, and should be a pretty easy fix. |
This matches Docker behavior, and will make the Docker frontend work with `podman system service` (Docker tries to create, then if that fails with 404 sends a request to pull the image). Fixes containers#6960 Signed-off-by: Matthew Heon <[email protected]>
#7003 to fix |
Somewhere
|
All podman error codes start with lower case.
|
I think we basically need to intercept those calls, and re-wrap with a new, capitalized error? It's very gross (we either have to duplicate the ErrNoSuchImage bit at the end, with a second capitalized version, or risk losing the error chain and the c/image bits that explain what actually went wrong) |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When using APIv2: images aren't pulled automatically for
docker run
. When running with docker, the image is pulled even if it doesn't exist locally.Steps to reproduce the issue:
rm -rf /var/lib/containers/
podman system service -t0 --log-level=debug
docker run -it --rm centos
Describe the results you received:
Describe the results you expected:
Should get a shell in a new centos container
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Output of
docker version
:Related to: #5386 #6867
The text was updated successfully, but these errors were encountered: