Open marhkb opened 1 year ago
A friendly reminder that this issue had no activity for 30 days.
@mheon PTAL
I think Volumes are only supposed to be specified through the volumes
field, not mounts
, but that leaves the question as to why mounts
allows specifying a type at all.
A friendly reminder that this issue had no activity for 30 days.
Looks correct from the local client point of view.
$ podman volume create dan
dan
$ podman run --mount type=volume,src=dan,destination=/dan alpine ls /dan
$ podman inspect -l
...
"Mounts": [
{
"Type": "volume",
"Name": "dan",
"Source": "/home/dwalsh/.local/share/containers/storage/volumes/dan/_data",
"Destination": "/dan",
"Driver": "local",
"Mode": "",
"Options": [
"nosuid",
"nodev",
"rbind"
],
"RW": true,
"Propagation": "rprivate"
}
Issue Description
I'm currently trying to use an exisiting volume when creating a new container through the HTTP API.
The creation of the container is successful, but it cannot be started, because the mount type is not set correctly. The API docs state that "Type represents the type of a mount" and here is described what types are allowed. So I would expect this to work.
Steps to reproduce the issue
Steps to reproduce the issue
$ podman volume create foo
curl --unix-socket /run/user/1000/podman/podman.sock http://d/v4.5.0/libpod/containers/create -H "content-type: application/json" --data '{ "image": "alpine", "mounts":[{ "destination": "/test", "options": ["rw"], "source": "foo", "type": "volume"}], "name": "bar" }'
bind
as mount type but it should havevolume
Describe the results you received
I've received a container having the wrong mount type
bind
.Describe the results you expected
The mount type of the created container should be
volume
instead ofbind
.podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting