-
Notifications
You must be signed in to change notification settings - Fork 139
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
ContainerConfig.entrypoint
is not deserializer correctly in some cases
#238
Comments
Thanks for the detailed report. Did you find this problem only on Podman, or is this reproducible on vanilla Docker ? At the moment the models are generated from the documentation, which currently don't specify a string: https://github.com/moby/moby/blob/master/api/swagger.yaml#L1271-L1281 If this is reproducible in plain Docker, we should ask upstream to have something (like a swagger The other alternative is to build some sort of exception into the generator... |
Hey @fussybeaver, Vanilla docker has no such problem, this is problem with podman only (which has other problems e.g Feel free to close this issue as irrelevant if you agree |
Perhaps we should initially raise the issue on the Podman bug tracker to see whether the Podman developers are responsive around these issues. |
All right, |
Opened issue on podman, lets see whats their opinion containers/podman#14513 |
Reading the thread on your ticket makes me realize how self-contained the podman system is. Perhaps we do need some sort of cargo feature in Bollard to toggle between these slight differences? |
@fussybeaver do you want to support podman as well, it is quite obvious that they have their own api? |
It would be nice to, but it needs some investigation at the best approach - I notice they have their own swagger API as well. Perhaps initially it'd be good just to look at the diff between the two swagger API's and checking whether it's supportable at all. |
Not related to this issue (directly) but to the discussion of podman being different. I'm also facing a parsing issue on bollard's side because here podman can return However, bollard/codegen/target/generated-sources/src/models.rs Lines 620 to 637 in 79ea9ce
|
I asked the Podman team about their Docker compat layer seeming to be different from Docker in this discussion -> containers/podman#14641 Their response is that "the docker compat api should always return correct docker output, if not file a bug with a reproducer". So nothing special should be needed in terms of bollard parsing Podman's docker compat output. |
Root of my problem is that i want to use |
I see... I use Podman exclusively. But in the rare event when I need to test a tool targeted for docker, I just set the |
In some cases, like when using
podman
ContainerConfig.entrypoint
is a string, in those cases deserializer freaks out withlooking at documentation at generated model it looks like it is expected to get either string or string array
bollard/codegen/target/generated-sources/src/models.rs
Line 377 in 79ea9ce
I guess there should be custom deserializer to cover this case.
Something like
might work.
or serde_with::OneOrMany if external dependency is preferred
The text was updated successfully, but these errors were encountered: