spiegel_podman/pkg/adapter
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
..
shortcuts Implement podman-remote rm 2019-04-09 11:55:26 -07:00
checkpoint_restore.go add --pull flag for podman create&run 2019-08-09 15:21:34 -04:00
client.go Allow changing IdentityFile and to IgnoreHosts 2019-10-01 19:46:48 +02:00
client_config.go Add connection information to podman-remote info 2019-05-16 11:03:22 -07:00
client_unix.go Avoid hard-coding path to varlink and podman 2019-10-01 19:46:54 +02:00
client_windows.go Apply changes also to the windows implementation 2019-10-02 20:49:09 +02:00
containers.go Add support for anonymous volumes to podman run -v 2019-10-17 13:18:17 -04:00
containers_remote.go Merge pull request #3549 from marcov/evict-container 2019-10-04 07:30:27 -07:00
errors.go remove libpod from main 2019-06-25 13:51:24 -05:00
images.go podman-remote image tree 2019-04-04 14:41:50 -05:00
images_remote.go podman-remote image tree 2019-04-04 14:41:50 -05:00
info_remote.go libpod removal from main (phase 2) 2019-06-27 07:56:24 -05:00
network.go enhance podman network rm 2019-09-12 14:03:52 -05:00
pods.go Update c/image to v4.0.1 and buildah to 1.11.3 2019-10-04 20:18:23 +02:00
pods_remote.go libpod removal from main (phase 2) 2019-06-27 07:56:24 -05:00
runtime.go Update c/image to v4.0.1 and buildah to 1.11.3 2019-10-04 20:18:23 +02:00
runtime_remote.go Update c/image to v4.0.1 and buildah to 1.11.3 2019-10-04 20:18:23 +02:00
runtime_remote_supported.go enable podman-remote on windows 2019-04-30 15:28:39 -05:00
sigproxy_linux.go golangci-lint round #3 2019-07-21 14:22:39 -05:00
terminal.go move handleTerminalAttach to generic build 2019-07-23 13:30:14 -04:00
terminal_linux.go Move OCI runtime implementation behind an interface 2019-10-10 10:19:32 -04:00
volumes_remote.go Implement backend for 'volume inspect' 2019-08-02 15:08:30 -04:00