July 27, 2022

OpenShift 4.10 I: Common podman commands

$ podman pull registry.access.redhat.com/ubi9/httpd-24:latest
$ podman images registry.access.redhat.com/ubi9/httpd-24:latest
$ podman rmi registry.access.redhat.com/ubi9/httpd-24:latest
$ skopeo inspect docker://registry.access.redhat.com/ubi9/httpd-24:latest
$ podman inspect registry.access.redhat.com/ubi9/httpd-24:latest

$ podman search --list-tags registry.access.redhat.com/ubi9/httpd-24

$ podman run -d --name httpd-24 -p 8080:8080 registry.access.redhat.com/ubi9/httpd-24:latest 

$ podman exec -it httpd-24 /bin/bash

$ podman ps -a
$ podman logs httpd-24
$ podman inspect httpd-24

$ podman top httpd-24
$ podman stats

$ podman stop httpd-24
$ podman start httpd-24
$ podman restart httpd-24

$ podman kill httpd-24
$ podman rm httpd-24

$ podman kill -s [SIGTERM|SIGINT|SIGKILL] httpd-24
$ kill -l
 1) SIGHUP	 2) SIGINT	 3) SIGQUIT	 4) SIGILL	 5) SIGTRAP
 6) SIGABRT	 7) SIGBUS	 8) SIGFPE	 9) SIGKILL	10) SIGUSR1
11) SIGSEGV	12) SIGUSR2	13) SIGPIPE	14) SIGALRM	15) SIGTERM
...

Use first SIGTERM, then try SIGINT; and only if both fail, to try again with SIGKILL.

$ podman run --rm -it registry.access.redhat.com/ubi9/ubi:latest /bin/bash

$ podman commit 

$ podman save -o mysql.tar registry.redhat.io/rhel8/mysql-80
$ podman load -i mysql.tar

$ podman history 

No comments: