Containers Flashcards

1
Q

search for mysql image

A

podman search quay.io/rhel8/mysql

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

inspect an image before downloading

A

skopeo inspect docker://quay.io/app-sre/mysql

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

download image

A

podman pull docker://quay.io/app-sre/mysql

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

see install images

A

podman images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

see detail description of mysql

A

podman inspect mysql

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

remove mysql

A

podman rmi mysql

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

podman run -ti –name rhel8-base-os ubi8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

execute a command inside the container from host

A

podman exec rhel8-base-os cat /etc/redhat-release

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

reconnect to the container

A

podman attache rhel8-base-os

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

delete container

A

podman rm rhel8-base-os

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

run a command and immediately terminate container after command is finished

A

podman run –rm ubi7 ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

see all running containers

A

podman ps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

configure port mapping

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

stop a container

A

podman stop rhel7-port-map

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

start a container

A

podman start rhel7-port-map

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

pass and set environment variables

A

podman run -it -e HISTSIZE -e SECRET=”secret123” –name rhel8-env-vars ubi8

e) variables HISTSIZE and SECRET as directed. Use the specified
container image##