Containers Flashcards
search for mysql image
podman search quay.io/rhel8/mysql
inspect an image before downloading
skopeo inspect docker://quay.io/app-sre/mysql
download image
podman pull docker://quay.io/app-sre/mysql
see install images
podman images
see detail description of mysql
podman inspect mysql
remove mysql
podman rmi mysql
Launch a container using ubi8 (RHEL 8 image). Name this container
rhel8-base-os and open a terminal session (-t) for interaction (-i). Use
the podman run command
podman run -ti –name rhel8-base-os ubi8
execute a command inside the container from host
podman exec rhel8-base-os cat /etc/redhat-release
reconnect to the container
podman attache rhel8-base-os
delete container
podman rm rhel8-base-os
run a command and immediately terminate container after command is finished
podman run –rm ubi7 ls
see all running containers
podman ps
configure port mapping
podman search registry.redhat.redhat.io/rhel7/httpd
podman login registry.redhat.io
podman pull registry.redhat.io/rhscl/httpd-24-rhel7
podmand run -dp 10000:8000 –name rhel7-port-map httpd-24-rhel7 ##-d detached; -p port; host port 10000 container port 8000###
podman ps
podman port rhel7-port-map ##shows port mapping
stop a container
podman stop rhel7-port-map
start a container
podman start rhel7-port-map