spiegel_podman/pkg
Matthew Heon 2de22ebf0d Ensure volumes-from mounts override image volumes
We do not allow volumes and mounts to be placed at the same
location in the container, with create-time checks to ensure this
does not happen. User-added conflicts cannot be resolved (if the
user adds two separate mounts to, say, /myapp, we can't resolve
that contradiction and error), but for many other volume sources,
we can solve the contradiction ourselves via a priority
hierarchy. Image volumes come first, and are overridden by the
`--volumes-from` flag, which are overridden by user-added mounts,
etc, etc. The problem here is that we were not properly handling
volumes-from overriding image volumes. An inherited volume from
--volumes-from would supercede an image volume, but an inherited
mount would not. Solution is fortunately simple - just clear out
the map entry for the other type when adding volumes-from
volumes.

Makes me wish for Rust sum types - conflict resolution would be a
lot simpler if we could use a sum type for volumes and bind
mounts and thus have a single map instead of two maps, one for
each type.

Fixes #19529

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-08-07 15:04:33 -04:00
..
annotations Remove ReservedAnnotations from kube generate specification 2023-01-18 08:46:24 -05:00
api manifest/push: add support for --add-compression 2023-08-03 14:20:38 +05:30
auth fix(deps): update module github.com/docker/docker to v24 2023-05-22 15:32:12 +02:00
autoupdate auto update: fix usage of --authfile 2023-07-05 08:30:39 +02:00
bindings manifest/push: add support for --add-compression 2023-08-03 14:20:38 +05:30
channel bump golangci-lint to v1.50.1 2022-12-15 13:39:56 +01:00
checkpoint criu: return error when checking for min version 2023-06-12 15:29:21 +02:00
copy pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
criu criu: return error when checking for min version 2023-06-12 15:29:21 +02:00
ctime Replace deprecated ioutil 2022-09-20 15:34:27 -04:00
domain Merge pull request #19468 from flouthoc/manifest-add-compression 2023-08-03 13:15:34 +02:00
env Check tty flag to set default terminal in Env 2023-08-03 12:29:21 +01:00
errorhandling Fix typos 2023-02-11 18:23:24 +01:00
inspect pkg/inspect: remove unused ImageResult type 2022-05-24 16:07:39 +02:00
k8s.io *: migrate image registry to registry.k8s.io 2023-04-11 10:30:43 -04:00
lookup source code comments and docs: fix typos, language, Markdown layout 2023-05-22 07:52:16 +02:00
machine Merge pull request #19510 from baude/errorifkeyexists 2023-08-05 12:27:14 +02:00
namespaces source code comments and docs: fix typos, language, Markdown layout 2023-05-22 07:52:16 +02:00
parallel Fix stutters 2022-09-10 07:52:00 -04:00
ps Cleanup CIDFile on podman-remote run --rm command 2023-08-01 14:24:55 -04:00
rctl pkg/rctl: Remove unused cgo dependency 2022-10-31 15:13:48 +00:00
rootless add a podman-compose command 2023-07-24 19:23:04 +02:00
seccomp pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
selinux Fix SELinux functions names to not be repetitive 2020-04-23 15:57:34 -04:00
signal Run codespell on code 2022-11-04 10:57:41 -04:00
specgen Ensure volumes-from mounts override image volumes 2023-08-07 15:04:33 -04:00
specgenutil Add support for confined users 2023-08-01 11:25:00 -04:00
systemd Add glob support to podman run/create --mount 2023-07-27 06:32:54 -04:00
terminal podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
timetype bump golangci-lint to v1.49.0 2022-10-17 09:19:41 +02:00
trust Revert the usage of home.GetConfigHome() 2023-07-17 18:29:06 +02:00
util Use constants for mount types 2023-07-14 07:17:21 -04:00