mirror of
https://github.com/containers/podman.git
synced 2025-05-21 00:56:36 +08:00

Basic theory: We remove the container, but *only from the DB*. We leave it in c/storage, we leave the lock allocated, we leave it running (if it is). Then we create an identical container with an altered name, and add that back to the database. Theoretically we now have a renamed container. The advantage of this approach is that it doesn't just apply to rename - we can use this to make *any* configuration change to a container that does not alter its container ID. Potential problems are numerous. This process is *THOROUGHLY* non-atomic at present - if you `kill -9` Podman mid-rename things will be in a bad place, for example. Also, we can't rename containers that can't be removed normally - IE, containers with dependencies (pod infra containers, for example). The largest potential improvement will be to move the majority of the work into the DB, with a `RecreateContainer()` method - that will add atomicity, and let us remove the container without worrying about depencies and similar issues. Potential problems: long-running processes that edit the DB and may have an older version of the configuration around. Most notable example is `podman run --rm` - the removal command needed to be manually edited to avoid this one. This begins to get at the heart of me not wanting to do this in the first place... This provides CLI and API implementations for frontend, but no tunnel implementation. It will be added in a future release (just held back for time now - we need this in 3.0 and are running low on time). This is honestly kind of horrifying, but I think it will work. Signed-off-by: Matthew Heon <mheon@redhat.com>
69 lines
2.7 KiB
ReStructuredText
69 lines
2.7 KiB
ReStructuredText
Manage Containers
|
|
=================
|
|
|
|
:doc:`attach <markdown/podman-attach.1>` Attach to a running container
|
|
|
|
:doc:`checkpoint <markdown/podman-container-checkpoint.1>` Checkpoints one or more containers
|
|
|
|
:doc:`cleanup <markdown/podman-container-cleanup.1>` Cleanup network and mountpoints of one or more containers
|
|
|
|
:doc:`commit <markdown/podman-commit.1>` Create new image based on the changed container
|
|
|
|
:doc:`cp <markdown/podman-cp.1>` Copy files/folders between a container and the local filesystem
|
|
|
|
:doc:`create <markdown/podman-create.1>` Create but do not start a container
|
|
|
|
:doc:`diff <markdown/podman-diff.1>` Inspect changes on container's file systems
|
|
|
|
:doc:`exec <markdown/podman-exec.1>` Run a process in a running container
|
|
|
|
:doc:`exists <markdown/podman-container-exists.1>` Check if a container exists in local storage
|
|
|
|
:doc:`export <markdown/podman-export.1>` Export container's filesystem contents as a tar archive
|
|
|
|
:doc:`init <markdown/podman-init.1>` Initialize one or more containers
|
|
|
|
:doc:`inspect <markdown/podman-inspect.1>` Display the configuration of a container or image
|
|
|
|
:doc:`kill <markdown/podman-kill.1>` Kill one or more running containers with a specific signal
|
|
|
|
:doc:`list <markdown/podman-ps.1>` List containers
|
|
|
|
:doc:`logs <markdown/podman-logs.1>` Fetch the logs of a container
|
|
|
|
:doc:`mount <markdown/podman-mount.1>` Mount a working container's root filesystem
|
|
|
|
:doc:`pause <markdown/podman-pause.1>` Pause all the processes in one or more containers
|
|
|
|
:doc:`port <markdown/podman-port.1>` List port mappings or a specific mapping for the container
|
|
|
|
:doc:`prune <markdown/podman-container-prune.1>` Remove all stopped containers
|
|
|
|
:doc:`ps <markdown/podman-ps.1>` List containers
|
|
|
|
:doc:`rename <markdown/podman-rename.1>` Rename an existing container
|
|
|
|
:doc:`restart <markdown/podman-restart.1>` Restart one or more containers
|
|
|
|
:doc:`restore <markdown/podman-container-restore.1>` Restores one or more containers from a checkpoint
|
|
|
|
:doc:`rm <markdown/podman-rm.1>` Remove one or more containers
|
|
|
|
:doc:`run <markdown/podman-run.1>` Run a command in a new container
|
|
|
|
:doc:`runlabel <markdown/podman-container-runlabel.1>` Execute the command described by an image label
|
|
|
|
:doc:`start <markdown/podman-start.1>` Start one or more containers
|
|
|
|
:doc:`stats <markdown/podman-stats.1>` Display a live stream of container resource usage statistics
|
|
|
|
:doc:`stop <markdown/podman-stop.1>` Stop one or more containers
|
|
|
|
:doc:`top <markdown/podman-top.1>` Display the running processes of a container
|
|
|
|
:doc:`unmount <markdown/podman-unmount.1>` Unmounts working container's root filesystem
|
|
|
|
:doc:`unpause <markdown/podman-unpause.1>` Unpause the processes in one or more containers
|
|
|
|
:doc:`wait <markdown/podman-wait.1>` Block on one or more containers
|