CentOS8 container management tool Podman

The newly installed CentOS8 system in the new year, after installing it, found that there was no Docker. Later, I discovered that CentOS8 uses Podman as the default container management tool. I probably looked at the help. In fact, the usage of Podman is almost the same as the original docker, and the commands are basically the same. Let's take a look at how Podman manages containers.

installation##

CentOS8 uses dnf as the package manager, of course yum can still be used.

$ sudo dnf install podman

podman use##

I feel that the most obvious change between podman and docker is that podman does not need to start a background service, it can run directly, and can be run by ordinary users.

Pull mirror

$ podman pull nginx

Query mirror

$ podman images
REPOSITORY                TAG      IMAGE ID       CREATED      SIZE
docker.io/library/nginx   latest   2073e0bcb60e   2 days ago   131 MB

Start the container

$ podman run -d -p 8000:80 nginx
6988640 b68226332f0d998b9dfe1bdd4dcd20f0cb25e3fd8f46859c787941919

View container instance

$ podman ps 
CONTAINER ID  IMAGE                           COMMAND               CREATED        STATUS            PORTS                 NAMES
6988640 b6822  docker.io/library/nginx:latest  nginx -g daemon o...5 minutes ago  Up 5 minutes ago  0.0.0.0:8000->80/tcp  nostalgic_banzai

Stop the instance

$ podman stop 6988640b6822
6988640 b68226332f0d998b9dfe1bdd4dcd20f0cb25e3fd8f46859c787941919

Delete instance

$ podman rm 6988640b6822
6988640 b68226332f0d998b9dfe1bdd4dcd20f0cb25e3fd8f46859c787941919

Recommended Posts

CentOS8 container management tool Podman
centos system management
Centos system process management
Centos7 creates LVM disk management
Centos7 upgrade git version control tool
Container study notes CentOS7 install Docker