📝

Podmanとdockerのコマンドの違いを表にしてみた

2024/08/20に公開

Podman: 5.1.2
docker: 26.0.0, build 2ae903e

で--helpの結果を以下にまとめてみた。

一覧

podman(5.1.2) docker(26.0.0, build 2ae903e)
attach Attach to a running container attach Attach local standard input, output, and error streams to a running container
auto-update Auto update containers according to their auto-update policy
build Build an image using instructions from Containerfiles build Build an image from a Dockerfile
commit Create new image based on the changed container commit Create a new image from a container's changes
compose Run compose workloads via an external provider such as docker-compose or podman-compose compose* Docker Compose
container Manage containers container Manage containers
cp Copy files/folders between a container and the local filesystem cp Copy files/folders between a container and the local filesystem
create Create but do not start a container create Create a new container
diff Display the changes to the object's file system diff Inspect changes to files or directories on a container's filesystem
events Show podman system events events Get real time events from the server
exec Run a process in a running container exec Execute a command in a running container
export Export container's filesystem contents as a tar archive export Export a container's filesystem as a tar archive
farm Farm out builds to remote machines
generate Generate structured data based on containers, pods or volumes
healthcheck Manage health checks on containers
help Help about any command
history Show history of a specified image history Show the history of an image
image Manage images image Manage images
images List images in local storage images List images
import Import a tarball to create a filesystem image import Import the contents from a tarball to create a filesystem image
info Display podman system information info Display system-wide information
init Initialize one or more containers
inspect Display the configuration of object denoted by ID inspect Return low-level information on Docker objects
kill Kill one or more running containers with a specific signal kill Kill one or more running containers
kube Play containers, pods or volumes from a structured file
load Load image(s) from a tar archive load Load an image from a tar archive or STDIN
login Log in to a container registry login Log in to a registry
logout Log out of a container registry logout Log out from a registry
logs Fetch the logs of one or more containers logs Fetch the logs of a container
machine Manage a virtual machine
manifest Manipulate manifest lists and image indexes manifest Manage Docker image manifests and manifest lists
mount Mount a working container's root filesystem
network Manage networks network Manage networks
pause Pause all the processes in one or more containers pause Pause all processes within one or more containers
pod Manage pods
port List port mappings or a specific mapping for the container port List port mappings or a specific mapping for the container
ps List containers ps List containers
pull Pull an image from a registry pull Download an image from a registry
push Push an image to a specified destination push Upload an image to a registry
rename Rename an existing container rename Rename a container
restart Restart one or more containers restart Restart one or more containers
rm Remove one or more containers rm Remove one or more containers
rmi Remove one or more images from local storage rmi Remove one or more images
run Run a command in a new container run Create and run a new container from an image
save Save image(s) to an archive save Save one or more images to a tar archive (streamed to STDOUT by default)
search Search registry for image search Search Docker Hub for images
secret Manage secrets
start Start one or more containers start Start one or more stopped containers
stats Display a live stream of container resource usage statistics stats Display a live stream of container(s) resource usage statistics
stop Stop one or more containers stop Stop one or more running containers
system Manage podman system Manage Docker
tag Add an additional name to a local image tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
top Display the running processes of a container top Display the running processes of a container
unmount Unmount working container's root filesystem
unpause Unpause the processes in one or more containers unpause Unpause all processes within one or more containers
unshare Run a command in a modified user namespace
untag Remove a name from a local image
update Update an existing container update Update configuration of one or more containers
version Display the Podman version information version Show the Docker version information
volume Manage volumes volume Manage volumes
wait Block on one or more containers wait Block until one or more containers stop, then print their exit codes

概ね同じ印象。Podmanの方は、podを管理するので、守備範囲が少し広い感じ。
composeについては、docker側はプラグインをインストールしているので*付きで表示されている(つまりデフォルトではdocker composeはできない)。

dockerオリジナルなコマンド

Podmanを基準にすると、dockerオリジナルなコマンドが記載できないので、以下に記載。

command description
builder Manage builds
context Manage contexts
plugin Manage plugins
swarm Manage Swarm
trust Manage trust on Docker images

Discussion