Closed marhkb closed 2 years ago
Hey,
It seems that the documentation here is wrong and the actual type currently doesn't get generated. https://github.com/containers/podman/issues/13717
We'll probably have to add the new type by hand (as you have added in pods
) for now and override the parameter used in ContainerCreateOptsBuilder
.
Here is the full type to be added: https://github.com/opencontainers/runtime-spec/blob/main/specs-go/config.go#L110-L120
Hi @vv9k,
I just noticed that you added
ContainerCreateOptsBuilder::mounts
, which expects the following data. https://github.com/vv9k/podman-api-rs/blob/f87d80d50d4a4b3846c0f7f899b3f16ecf5fcd44/podman-api-stubs/lib/src/models.rs#L4694I have been using my own fork of
podman-api-rs
with a slightly different mounts option for a while now and would love to switch back to upstream. Here you can see how it looks. https://github.com/marhkb/pods/blob/95dee64fc5d2a79a3ddd7fe7d03f790d2ef986d1/src/view/container/creation_page.rs#L771 https://github.com/marhkb/pods/blob/95dee64fc5d2a79a3ddd7fe7d03f790d2ef986d1/src/view/container/creation_page.rs#L882podman-cockpit
was taken as an example for this. https://github.com/cockpit-project/cockpit-podman/blob/c53c2c9c5c7d8dd834994a9c7db4d7d09391ccdc/src/ImageRunModal.jsx#L220What is noticeable here is that the schema of the data that
podman-cockpit
uses does not match that of the official API and that in podman-rs. https://docs.podman.io/en/latest/_static/api.html?version=v4.2#tag/containers/operation/ContainerCreateLibpodHowever, when I switch back to
podman-api-rs
upstream, I have problems creating the volumes.I'm quite clueless. :-D Would you have any idea how to correctly use
mounts
option? Is the documentation of the podman API wrong, or do I use it in the wrong way?