Forrest logo
back to the podman tool

podman-run:tldr:a19ab

podman-run: Run command in a one-off container in interactive mode and pseudo-TTY.
$ podman run --rm --interactive --tty ${image:tag} ${command}
try on your machine

The command podman run is used to run a container using Podman, a popular open-source container runtime engine.

Here is the explanation of each flag and argument used in the command:

  • --rm: This flag indicates that the container should be automatically removed once it's stopped. This helps in cleaning up the system and removing any temporary containers.
  • --interactive or -i: This flag keeps STDIN open on the container, allowing the user to interact with it.
  • --tty or -t: This flag allocates a pseudo-TTY, enabling terminal-like functionalities within the container.
  • ${image:tag}: This is a placeholder for specifying the container image and its tag. It should be replaced with the desired image name and version/tag.
  • ${command}: This is another placeholder for defining the command or commands that should be executed within the container. It can be replaced with any valid shell command or a series of commands.

When the command is executed, Podman will pull the specified container image if it's not already available locally. Then, a new container will be created from the image. The container will run the specified command and provide an interactive terminal interface through which the user can interact with the running container. Once the command execution finishes or the user exits the container, it will be automatically removed due to the --rm flag.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the podman tool