Open hllizi opened 2 years ago
@hllizi: The label(s) kind/bu
cannot be applied, because the repository doesn't have them.
@jwhonce @baude PTAL
A friendly reminder that this issue had no activity for 30 days.
This looks like a swagger
or go-swagger
issue to me, it should resolve type for Mount
from runtime-spec
however it resolves types from docker/api/types/mount/mount.go
which is not even part of struct.
A friendly reminder that this issue had no activity for 30 days.
Also ran into the same exact issue, took a while to figure it out. Seems like the API docs may need some work.
A friendly reminder that this issue had no activity for 30 days.
Took me a while to find it out, only google search lead me here. Really confusing to have non reliable API docs.
Interested in opening a PR to clean them up?
Sure, will do
The documentation still has this error.
This still appears to be an issue.
Care to open a PR?
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
The Attribute for specifying a mount destination when creating a container appears to be "Destination" in the REST API and not "Target" (as in the cli).
Steps to reproduce the issue:
podman pull hello-world
curl http://localhost:8080/v3.4.2/libpod/containers/create -H "Content-Type: application/json" -d '{"Image": "hello-world-image-id", "mounts": [{"Type": "bind", "Source": "some-file", "Target": "/test", "BindOptions": {"NonRecursive": true}}]}' (obviously, with the podman service running on TCP port 8080)
Describe the results you received: {"cause":"container directory cannot be empty","message":"container directory cannot be empty","response":500}
Describe the results you expected: Properly built container.
Additional information you deem important (e.g. issue happens only occasionally): With podman 3.1.2, no error response was given and a container was built, but the problem was the same at heart: podman inspect container-id would show an empty string as the value of "Mounts.Destination".
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes