Forrest logo
back to the podman tool

podman-run:tldr:c1af4

podman-run: Run command in a new container in background and display its ID.
$ podman run --detach ${image:tag} ${command}
try on your machine

The command "podman run --detach ${image:tag} ${command}" is used to run a container in the background (detached mode) using the Podman container engine.

Here is a breakdown of the command:

  • "podman run": This is the basic command to run a container with Podman.
  • "--detach": This flag is used to run the container in the background, meaning it will start and run in the background without attaching the console to it.
  • "${image:tag}": This is the placeholder for specifying the name and tag of the container image you want to run. For example, you would replace ${image:tag} with something like nginx:latest to run a container based on the "nginx" image with the "latest" tag.
  • "${command}": This is the placeholder for optional command or arguments to be passed to the container. For example, you could pass a specific command that you want to execute within the container.

By using this command, you can launch a container in the background with the specified container image and optional command, which allows you to continue using the terminal without being attached to the container's console.

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