Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions lesson_3/ex1_solution.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

- Image Size:
- Container Name:
- Container ID:
- Exposed port:
- Postgres version:
- Data Volume (aka PGDATA):
- default entrypoint:
- default command:
- baseline consumption : CPU ___% MEM ___MB
- OS: Distro Version Codename (Ubuntu 22.04 jammy)
- Image Size: 377Mb
- Container Name: festive_heisenberg
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recoméndoche nomear os containers

- Container ID: a09e501aa7d9
- Exposed port: 5432
- Postgres version: 15.0
- Data Volume (aka PGDATA): /var/lib/postgresql/data
- default entrypoint: docker-entrypoint.sh
- default command: ["/bin/sh","-c","#(nop) ", "CMD [\"postgres\"]"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, é suficient con postgres, o resto é cacharrería interna de docker (agás o CMD)

- baseline consumption : CPU 0.00% MEM 940KiB
- OS: Debian 15.0-1.pgdg110+1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o sistema operativo é Debian 11, pódese mirar dentro do container con more /etc/issue/

16 changes: 15 additions & 1 deletion lesson_3/ex1_solution.sh
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
docker pull
docker pull postgres:latest
docker image ls postgres
docker run -it -e POSTGRES_HOST_AUTH_METHOD=trust --entrypoint /bin/bash postgres
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o entrypoint aquí non impide lanzar un comando así que podes entrar con /bin/bash (non se lanzará o postgres pero non nos importa), ou lanzar e entrar despois con docker exec -it container_name /bin/bash


docker ps
docker image inspect postgres:latest

#Dentro del contenedor:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gracias polas aclaracións, queda máis lexible


postgres --version

# Para ver los recursos

docker container stats festive_heisenberg

10 changes: 8 additions & 2 deletions lesson_3/ex2_solution.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx
REPOSITORY TAG IMAGE ID CREATED SIZE

nginx 1.22 0ccb2559380c 9 days ago 142MB

nginx 1.22.1 0ccb2559380c 9 days ago 142MB

nginx stable 0ccb2559380c 9 days ago 142MB

5 changes: 4 additions & 1 deletion lesson_3/ex2_solution.sh
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
docker pull
docker image pull nginx:1.22.1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Baixaches a mesma imaxe 3 veces. Fíxate na IMAGE ID

En cada liña viñan varios tags para a mesma imaxe, pero cada liña é diferent
Terías que ter collido 1 por cada liña para obter a normal, perl, alpine e alpine perl
Proba outra vez se queres.

docker image pull nginx:stable
docker image pull nginx:1.22
docker image ls nginx