Run Containers Flashcards

1
Q

What command do you use to install container-tools?

A

sudo dnf install container-tools

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

What command is used to make a registry in your home directory?

A

mkdir -p ~/.config/containers/

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

What command is used to used the /tmp/registries.conf file as a template?

A

cp /tmp/registries.conf ~/.config/containers/

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

What command is used to login to container registry with the podman login command?

A

podman login <container></container>

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

What command is used to view information about the image?

A

skopeo inspect docker://registry.lab.example.com/rhel8/mariadb-103

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

What command is used to start a detached container to obtain the mysql UID and GID?

A

podman run -d –name inventorydb -p 13306:3306 \
-e MYSQL_USER=operator1 \
-e MYSQL_PASSWORD=redhat \
-e MYSQL_DATABASE=inventory \
-e MYSQL_ROOT_PASSWORD=redhat \
-v /home/podsvc/db_data:/var/lib/mysql/data:Z \
registry.lab.example.com/rhel8/mariadb-103:1-86

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

What command is used to confirm the database is running?

A

~/containers-review/testdb.sh

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

What command do you use to login directly as the user to configure the systemd daemon?

A

ssh user@host

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

What command do you use to create the systemd configuration directory?

A

mkdir -p ~/.config/systemd/user

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

What command do you use to change to the directory where you will be placing the systemd unit file from the running container?

A

podman generate systemd –name inventorydb –file –new

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

What command is used to create the systemd unit file from the running container?

A

podman generate systemd –name inventorydb –files –new

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

What command is used to stop and then delete a container?

A

podman stop <container>
podman rm <container></container></container>

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

What command is used to reload the systemd daemon?

A

systemctl –user daemon-reload

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

What command is used to enable start the container-inventorydb service?

A

systemctl –user enable –now container-inventorydb.service

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

What command is used to confirm that the confirm that the container is running?

A

~/containers-review/testdb.sh
podman ps

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

What command is used to enable user services to start automatically when the server starts?

A

loginctl enable-linger