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
25 changes: 15 additions & 10 deletions lesson_3/ex1_solution.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@

- 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: adoring_mclean
Copy link
Owner

Choose a reason for hiding this comment

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

recomendación: nomear sempre os nosos contedores

- Container ID: b9b60d8b11e8
- Exposed port: "5432/tcp": {}
- Postgres version: "GOSU_VERSION=1.14",
"PG_VERSION=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.

chegaba co PG_VERSION

"GOSU_VERSION=1.14",
"PG_VERSION=15.0-1.pgdg110+1",
- Data Volume (aka PGDATA): "PGDATA=/var/lib/postgresql/data"
- default entrypoint: .[0].Config.Entrypoint.docker-entrypoint.sh
Copy link
Owner

Choose a reason for hiding this comment

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

chega cos comandos finais: docker-entrypoint.sh e postgres

- default command: "/bin/sh",
"Cmd": [
"postgres"
- baseline consumption : CPU ___% MEM ___MB 0.00% 31.63MiB / 12.33GiB 0.25%
- OS: Distro Version Codename (Ubuntu 22.04 jammy):PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
Copy link
Owner

Choose a reason for hiding this comment

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

a primeira version (ubuntu 22) é probablemente a do anfitrión. Buscábase a do contedor, que é a segunda que puxeches

9 changes: 9 additions & 0 deletions lesson_3/ex1_solution.sh
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
docker pull
docker image ls
docker run -d -e POSTGRES_PASSWORD=password postgres:latest
docker ps
docker ps
docker inspect postgres:latest | jq .[0].Config.ExposedPorts
Copy link
Owner

Choose a reason for hiding this comment

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

bo traballo con JQ

docker inspect postgres:latest | jq | grep "VERSION"
docker inspect postgres:latest | jq .[0].Config.Entrypoint.docker-entrypoint.sh
docker stats
docker exec -it b9b60d8b11e8 bash, cat /etc/os-release
Copy link
Owner

Choose a reason for hiding this comment

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

podes lanzar o comando directamente con exec:
docker exec -it cat /etc/os-release

5 changes: 4 additions & 1 deletion lesson_3/ex2_solution.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx
nginx stable-perl df1998569adb 13 days ago 188MB
nginx stable 0ccb2559380c 13 days ago 142MB
nginx stable-alpine-perl 98f7c1f8a3fa 2 weeks ago 58.6MB
nginx stable-alpine ec84f916d1ec 2 weeks ago 23.6MB
6 changes: 5 additions & 1 deletion lesson_3/ex2_solution.sh
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
docker pull
docker pull
docker pull nginx:stable-perl
docker pull nginx:stable-alpine
docker pull nginx:stable-alpine-perl
docker image ls