podman
Podman is a daemonless, open source, Linux native tool designed to make it easy to find, run, build, share and deploy applications using Open Containers Initiative (OCI) Containers and Container Images. It is compatible with docker cli, so you can alias podman to docker.
To install podman on Oracle Linux 8, run
1 |
dnf install podman |
Once installed, you can search for a container image with the command
1 |
podman search nginx |
To run nginx container, use the command
1 |
podman run -d -p 80:80 docker.io/library/nginx |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
[root@nginx-proxy ~]# podman run -d -p 80:80 docker.io/library/nginx 264b06dd3b0a2f2a2823562fd4c5dd3cd7f9a312baf17765df060d4e72e55725 [root@nginx-proxy ~]# curl localhost <!DOCTYPE html> <html> <head> <title>Welcome to nginx!</title> <style> body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } </style> </head> <body> <h1>Welcome to nginx!</h1> <p>If you see this page, the nginx web server is successfully installed and working. Further configuration is required.</p> <p>For online documentation and support please refer to <a href="http://nginx.org/">nginx.org</a>.<br/> Commercial support is available at <a href="http://nginx.com/">nginx.com</a>.</p> <p><em>Thank you for using nginx.</em></p> </body> </html> [root@nginx-proxy ~]# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 264b06dd3b0a docker.io/library/nginx:latest nginx -g daemon o... About a minute ago Up About a minute ago 0.0.0.0:80->80/tcp wonderful_heisenberg [root@nginx-proxy ~]# podman stop 264b06dd3b0a 264b06dd3b0a [root@nginx-proxy ~]# podman rm 264b06dd3b0a 264b06dd3b0a2f2a2823562fd4c5dd3cd7f9a312baf17765df060d4e72e55725 [root@nginx-proxy ~]# |