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: trusting_murdock
- Container ID: 3c8d719dfb2d
- Exposed port: 5432/tcp
- Postgres version: ???????
Copy link
Owner

Choose a reason for hiding this comment

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

podes conseguilo de varios xeitos.

  • A través de postgres, entras no container e lanzas postgres -V
  • inspeccionando: docker inspect trusting_murdock | grep PG

- 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.

Suficiente con postgres. O que puxeches é a liña da historia completa

- baseline consumption : CPU 0.0% MEM 30.21MB
- OS: Distro Version Codename (Ubuntu 22.04 jammy)?????
Copy link
Owner

Choose a reason for hiding this comment

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

Necesitas entrar no contedor e mirar algo como:

  • cat /etc/lsb-release
  • cat /etc/os-release
  • cat /etc/issue

Cal é a boa dependerá da distro. como opción xeral: cat /etc/*elease*, esta caza case todas

6 changes: 5 additions & 1 deletion lesson_3/ex1_solution.sh
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
docker pull
docker run -e POSTGRES_PASSWORD=1234 postgres:latest
Copy link
Owner

Choose a reason for hiding this comment

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

Moi recomendable nomear o contedor. En contedores coma este, que siguen vivos despois de lanzalos, o recomendable é lanzalos en modo "detached" e interactivo: docker run -itd ...

docker ps
docker image ls
docker inspect postgres:latest
docker container stats
7 changes: 5 additions & 2 deletions 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
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx 1.22.1-perl df1998569adb 9 days ago 188MB
nginx 1.22.1 0ccb2559380c 9 days ago 142MB
nginx 1.22.1-alpine-perl 98f7c1f8a3fa 2 weeks ago 58.6MB
nginx 1.22.1-alpine ec84f916d1ec 2 weeks ago 23.6MB
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 pull nginx:1.22.1-perl
docker pull nginx:1.22.1-alpine-perl
docker pull nginx:1.22.1-alpine
docker pull nginx:1.22.1