spiegel_podman/pkg/spec
Matthew Heon 0d623914d0 Add support for anonymous volumes to podman run -v
Previously, when `podman run` encountered a volume mount without
separate source and destination (e.g. `-v /run`) we would assume
that both were the same - a bind mount of `/run` on the host to
`/run` in the container. However, this does not match Docker's
behavior - in Docker, this makes an anonymous named volume that
will be mounted at `/run`.

We already have (more limited) support for these anonymous
volumes in the form of image volumes. Extend this support to
allow it to be used with user-created volumes coming in from the
`-v` flag.

This change also affects how named volumes created by the
container but given names are treated by `podman run --rm` and
`podman rm -v`. Previously, they would be removed with the
container in these cases, but this did not match Docker's
behaviour. Docker only removed anonymous volumes. With this patch
we move to that model as well; `podman run -v testvol:/test` will
not have `testvol` survive the container being removed by `podman
rm -v`.

The sum total of these changes let us turn on volume removal in
`--rm` by default.

Fixes: #4276

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-17 13:18:17 -04:00
..
config_linux.go spec: provide custom implementation for getDevices 2019-09-02 13:27:47 +02:00
config_linux_cgo.go spec: move cgo stuff to their own file 2019-07-02 16:41:03 +02:00
config_linux_nocgo.go spec: move cgo stuff to their own file 2019-07-02 16:41:03 +02:00
config_unsupported.go Add darwin support for remote-client 2019-01-11 11:30:28 -06:00
containerconfig.go remove libpod from main 2019-06-25 13:51:24 -05:00
createconfig.go Merge pull request #4233 from mheon/fix_cc 2019-10-12 19:26:37 +02:00
parse.go golangci-lint round #3 2019-07-21 14:22:39 -05:00
ports.go Spell check strings and comments 2018-05-25 08:45:15 +00:00
spec.go rootless: do not set PIDs limit if --cgroup-manager=cgroupfs 2019-10-11 13:34:51 +02:00
spec_test.go Check for rootless before checking cgroups version in spec_test. 2019-09-15 21:28:13 +03:00
storage.go Add support for anonymous volumes to podman run -v 2019-10-17 13:18:17 -04:00
storage_test.go Use EqualValues instead of reflect equality 2019-05-01 10:19:05 -04:00