Contenedores Flashcards

(39 cards)

1
Q

Como se llama el paquete de contenedores

A

yum module install container-tools

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

Como se conforma el nombre de las imágenes

A

registry_name/username/image_name:tag

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

Como

Se obtiene un contenedor registry.access.redhat.com/ubi8/ubi:latest

A

podman pull registry.access.redhat.com/ubi8/ubi:latest

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

Como se ven las imágenes disponibles localmente en podman

A

podman images

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

Como se ejecuta un contenedor registry.access.redhat.com/ubi8/ubi:latest

A

podman run -it registry.access.redhat.com/ubi8/ubi:latest

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

Como se ejecuta en modo interactivo un contenedor

A

podman run -it –name=rhel8 registry.access.redhat.com/ubi8/ubi /⁠bin/bash

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

Discuta comando y elimina el contenedor posterior cat /etc/os-release

A

podman run –rm registry.access.redhat.com/ubi8/ubi cat /etc/os-release

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

Como se ve un proceso dentro de un contenedor

A

podman run -it registry.access.redhat.com/ubi7/ubi /bin/bash

ps aux

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

Como te firmas al portal de registros

A

podman login registry.lab.example.com

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

Archivo para obtener información acerca de registros de contenedor

A

cat /etc/containers/registries.conf

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

Donde está el archivo de podman en root y usuario regular

A

$HOME/.config/containers

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

Comando para obtener info de podman

A

podman info

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

Como registras como inseguro un registro de contenedor

A

[registries.insecure] section

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

Como se busca un registro de contenedores

A

podman search registry.redhat.io/rhel8

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

Parámetro y comando para ver descripción larga de contenedores

A

podman search –no-trunc registry.access.redhat.com/rhel8

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

Opciones de Búsqueda para podman search

A

–limit

–filter

stars=
is-automated =
is-official=

–tls-verify

17
Q

Como se inspecciona una imagen antes de descargarla

A

skopeo inspect docker://registry.redhat.io/rhel8/python-36

18
Q

Como se inspecciona una imagen local

A

podman inspect registry.redhat.io/rhel8/python-36

19
Q

Como se elimina una imagen

A

podman rmi registry.redhat.io/rhel8/python-36:latest

20
Q

Como se exporta un puerto en un contenedor

A

podman rmi registry.redhat.io/rhel8/python-36:latest

21
Q

Como se listan todos los puertos en uso por de podman

A

podman port -a

22
Q

Como te aseguras que tengas permiso para ver el puerto de contenedores

A

firewall-cmd –add-port=8000/tcp

23
Q

Como se mandan variables de ambiente en podman

A

podman run -d –name container_name -e MYSQL_USER=user_name -e MYSQL_PASSWORD=user_password -e MYSQL_DATABASE=database_name -⁠e MYSQL_ROOT_PASSWORD=mysql_root_password -p 3306:3306 registry.redhat.io/⁠rhel8/⁠mariadb-103:1-102

24
Q

Como se ven los contenedores corriendo

25
Como se detiene un contenedor
podman stop my-httpd-container
26
Como se elimina un contenedor
podman rm NAME
27
Como se reinicia un contenedor
podman restart NAME
28
Como se mata un contenedor
podman kill NAME
29
Como se manda señal de kill a un contenedor
podman kill -s SIGKILL my-httpd-container
30
Como se ejecutan comandos en modo interactivo
podman exec 7ed6e671a600 cat /etc/redhat-release
31
Como inicias sesión interactiva en un contenedor
podman exec -it my_webserver /bin/bash
32
Como se ejecuta y se usa un contenedor en modo interactivo
podman exec -it my_webserver /bin/bash
33
Como se coloca un disco persistente en un contenedor
--volume host_dir:container_dir:Z podman run -d --name mydb -v /home/user/dbfiles:/var/lib/mysql:Z -e MYSQL_USER=user -e MYSQL_PASSWORD=redhat -e MYSQL_DATABASE=inventory registry.redhat.io/rhel8/mariadb-103:1-102
34
Como colocas el contexto selinux de contenedores
--volume host_dir:container_dir:Z
35
Como se habilita que los servicios de usuario inicien con el servidor y no solo mientras haya sesiones de usuario
loginctl enable-linger loginctl show-user user loginctl disable-linger loginctl show-user user
36
Donde se almacenan los archivos de systemd de usuario
ls ~/.config/systemd/user/
37
Como se agrega un nuevo servicio de usuario
systemctl —user daemon-reload systemctl —user enable myapp.service systemctl —user start myapp.service
38
Instrucción para crear systemd instrucciones a archivo y no | Mandarlo a output estándar
podman generate systemd —files —name NAME —new
39
Ejemplo de archivo registries.conf
``` [registries.search] registries = [‘registry.lab.example.com’] [registries.insecure] registries = [] [registries.block] registries = [] ```