spiegel_podman/pkg/specgen/generate
Matt Heon 458ba5a8af Fix podman stop and podman run --rmi
This started off as an attempt to make `podman stop` on a
container started with `--rm` actually remove the container,
instead of just cleaning it up and waiting for the cleanup
process to finish the removal.

In the process, I realized that `podman run --rmi` was rather
broken. It was only done as part of the Podman CLI, not the
cleanup process (meaning it only worked with attached containers)
and the way it was wired meant that I was fairly confident that
it wouldn't work if I did a `podman stop` on an attached
container run with `--rmi`. I rewired it to use the same
mechanism that `podman run --rm` uses, so it should be a lot more
durable now, and I also wired it into `podman inspect` so you can
tell that a container will remove its image.

Tests have been added for the changes to `podman run --rmi`. No
tests for `stop` on a `run --rm` container as that would be racy.

Fixes #22852
Fixes RHEL-39513

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-08-20 09:51:18 -04:00
..
kube Add the ability to automount images as volumes via play 2024-04-25 14:12:27 -04:00
config_common.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
config_common_test.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
config_freebsd.go Bump tags.cncf.io/container-device-interface to v0.7.1 2024-04-06 12:25:26 +02:00
config_linux.go update golangci-lint to 1.60.1 2024-08-19 11:41:28 +02:00
config_linux_seccomp.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
config_linux_test.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
container.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
container_create.go Add support for image volume subpaths 2024-04-25 14:12:27 -04:00
namespaces.go Merge pull request #21512 from Luap99/pasta-netname-removal 2024-02-08 17:17:55 +00:00
namespaces_freebsd.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
namespaces_linux.go pkg/specgen: use fileutils.(Le|E)xists 2024-04-19 09:52:14 +02:00
oci.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
oci_freebsd.go Add volumes-from support using annotation in kube yaml 2024-02-14 07:31:43 -08:00
oci_linux.go Fix podman stop and podman run --rmi 2024-08-20 09:51:18 -04:00
pause_image.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
pod_create.go update golangci-lint to 1.60.1 2024-08-19 11:41:28 +02:00
pod_create_test.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
ports.go Replace golang.org/x/exp/slices with slices from std 2024-04-23 11:16:40 +02:00
ports_bench_test.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
ports_test.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
security_freebsd.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
security_linux.go Replace golang.org/x/exp/slices with slices from std 2024-04-23 11:16:40 +02:00
storage.go pkg/specgen: use fileutils.(Le|E)xists 2024-04-19 09:52:14 +02:00
storage_freebsd.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
storage_linux.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
validate_freebsd.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
validate_linux.go pkg/specgen: use fileutils.(Le|E)xists 2024-04-19 09:52:14 +02:00