Podman en macOS🔗

Podman es un container engine, siendo una alternativa a Docker, que implementa las especificaciones de la Open Containers Initiative (OCI).

Podman Desktop como sustituto de Docker Desktop

El proyecto Podman Desktop, relacionado al proyecto Podman, busca ser un sustituto directo del producto Docker Desktop. Uno de los motivos de su existencia es un cambio en la licencia de Docker Desktop.

  • Podman: principal herramienta en la linea de comandos para la administración de imágenes y contenedores basada en Docker CLI .

    Podman como sustituto de Docker CLI

    Es posible tratar al proyecto Podman como un sustituto directo del proyecto Docker CLI, siendo posible usar el comando podman en lugar del comando docker o bien definir un alias en nuestro interprete de comandos o shell: alias podman=docker.

  • Podman Compose: proyecto que permite la ejecución de aplicaciones en multi-contenedores definidos en un archivo compose.yaml (o bien docker-compose.yaml) siguiendo The Compose Specification.

Sobre la máquina virtual en macOS

Los contenedores, en este contexto, son una tecnología propia del kernel Linux (namespaces y cgroups) por lo que su uso y ejecución es transparente en una distribución de Linux. De tal manera que tanto en macOS y Windows es necesario el uso de una maquina virtual con una distribución de Linux para poder hacer uso de contenedores. El sistema operativo en la máquina virtual es machine-os.

Para listar las máquinas virtuales:

[nihilipster@localhost:~]$ podman machine list --all-providers
NAME        VM TYPE     CREATED     LAST UP     CPUS        MEMORY      DISK SIZE

Para iniciar una maquina virtual (o una instancia) y en ella al container engine:

[nihilipster@localhost:~]$ podman machine init --cpus 8 --disk-size 120 --memory 32768 vm-aarch64-podman
Looking up Podman Machine image at quay.io/podman/machine-os:5.3 to create VM
Getting image source signatures
Copying blob cc337dac08f3 done   |
Copying config 44136fa355 done   |
Writing manifest to image destination
cc337dac08f317e9141e55f324d3af74f5d72f39c797f8d1f396948854fa655d
Extracting compressed file: vm-aarch64-podman-arm64.raw: done
Machine init complete
To start your machine run:

    podman machine start vm-aarch64-podman

[nihilipster@localhost:~]$ podman machine list --all-providers
NAME                VM TYPE     CREATED        LAST UP     CPUS        MEMORY      DISK SIZE
vm-aarch64-podman*  applehv     4 minutes ago  Never       8           32GiB       120GiB

Para iniciar la máquina virtual:

[nihilipster@localhost:~]$  podman machine start vm-aarch64-podman
Starting machine "vm-aarch64-podman"

This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:

    podman machine set --rootful vm-aarch64-podman

API forwarding listening on: /var/folders/zl/l4xbbwzx3p58fg_cv3mkgt380000gn/T/podman/vm-aarch64-podman-api.sock

The system helper service is not installed; the default Docker API socket
address can't be used by podman. If you would like to install it, run the following commands:

        sudo /opt/local/bin/podman-mac-helper install
        podman machine stop vm-aarch64-podman; podman machine start vm-aarch64-podman

You can still connect Docker API clients by setting DOCKER_HOST using the
following command in your terminal session:

        export DOCKER_HOST='unix:///var/folders/zl/l4xbbwzx3p58fg_cv3mkgt380000gn/T/podman/vm-aarch64-podman-api.sock'

Machine "vm-aarch64-podman" started successfully

[nihilipster@localhost:~]$ podman machine list --all-providers
NAME                VM TYPE     CREATED        LAST UP            CPUS        MEMORY      DISK SIZE
vm-aarch64-podman*  applehv     2 minutes ago  Currently running  8           32GiB       120GiB

Para detener la máquina virtual:

[nihilipster@localhost:~]$ podman machine stop vm-aarch64-podman
Machine "vm-aarch64-podman" stopped successfully

Para determinar la carpeta donde reside la configuración de la máquina virtual:

[nihilipster@localhost:~]$ podman machine inspect vm-aarch64-podman --format '{{.ConfigDir.Path}}'
$HOME/.config/containers/podman/machine/applehv

Para obtener la información sobre la instancia (“host”) de Podman:

[nihilipster@localhost:~]$ podman info
host:
  arch: arm64
  buildahVersion: 1.38.1
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.12-3.fc41.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: '
  cpuUtilization:
    idlePercent: 96.58
    systemPercent: 2.01
    userPercent: 1.41
  cpus: 8
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: coreos
    version: "41"
  eventLogger: journald
  freeLocks: 2048
  hostname: localhost.localdomain
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 1000000
    uidmap:
    - container_id: 0
      host_id: 501
      size: 1
    - container_id: 1
      host_id: 100000
      size: 1000000
  kernel: 6.12.7-200.fc41.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 33110257664
  memTotal: 33574281216
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.13.1-1.fc41.aarch64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.13.1
    package: netavark-1.13.1-1.fc41.aarch64
    path: /usr/libexec/podman/netavark
    version: netavark 1.13.1
  ociRuntime:
    name: crun
    package: crun-1.19.1-1.fc41.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 1.19.1
      commit: 3e32a70c93f5aa5fea69b50256cca7fd4aa23c80
      rundir: /run/user/501/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20241211.g09478d5-1.fc41.aarch64
    version: |
      pasta 0^20241211.g09478d5-1.fc41.aarch64-pasta
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: unix:///run/user/501/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.3.1-1.fc41.aarch64
    version: |-
      slirp4netns version 1.3.1
      commit: e5e368c4f5db6ae75c2fce786e31eef9da6bf236
      libslirp: 4.8.0
      SLIRP_CONFIG_VERSION_MAX: 5
      libseccomp: 2.5.5
  swapFree: 0
  swapTotal: 0
  uptime: 0h 0m 13.00s
  variant: v8
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /var/home/core/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/home/core/.local/share/containers/storage
  graphRootAllocated: 127890829312
  graphRootUsed: 4620619776
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 0
  runRoot: /run/user/501/containers
  transientStore: false
  volumePath: /var/home/core/.local/share/containers/storage/volumes
version:
  APIVersion: 5.3.2
  Built: 1737504000
  BuiltTime: Tue Jan 21 18:00:00 2025
  GitCommit: ""
  GoVersion: go1.23.4
  Os: linux
  OsArch: linux/arm64
  Version: 5.3.2

Del anterior resultado se puede determinar la siguiente información:

  • Sistema operativo en ejecución dentro de la máquina virtual: podman info --format '{{.Host.Distribution}}'
  • buildah: podman info --format '{{.Host.BuildahVersion}}'
  • Backend usado para la gestion de la red virtual: podman info --format '{{.Host.NetworkBackendInfo}}'
  • crun: podman info --format '{{.Host.OCIRuntime}}'
  • Plugins: podman info --format '{{.Plugins}}'
  • Containers Registries: podman info --format '{{.Registries}}'
  • Versiones relacionadas a Podman: podman info --format '{{.Version}}'

A su vez se tiene el siguiente comando para mayor información del cliente/servidor:

[nihilipster@localhost:~]$ podman version
Client:       Podman Engine
Version:      5.3.2
API Version:  5.3.2
Go Version:   go1.24.0
Built:        Wed Dec 31 18:00:00 1969
OS/Arch:      darwin/arm64

Server:       Podman Engine
Version:      5.3.2
API Version:  5.3.2
Go Version:   go1.23.4
Built:        Tue Jan 21 18:00:00 2025
OS/Arch:      linux/arm64

Imágenes y contenedores🔗

Para obtener una imagen desde algún container registry, por ejemplo la imagen oficial ‘hello-world’ en el Docker Hub:

[nihilipster@localhost:~]$ podman image pull docker.io/hello-world:latest
Trying to pull docker.io/library/hello-world:latest...
Getting image source signatures
Copying blob sha256:c9c5fd25a1bdc181cb012bc4fbb1ab272a975728f54064b7ae3ee8e77fd28c46
Copying config sha256:f1f77a0f96b7251d7ef5472705624e2d76db64855b5b121e1cbefe9dc52d0f86
Writing manifest to image destination
f1f77a0f96b7251d7ef5472705624e2d76db64855b5b121e1cbefe9dc52d0f86

Imagen Hello World de Podman

Existe la imagen quay.io/podman/hello a manera de “Hello World” por parte del proyecto Podman en su repositorio quay.io/repository/podman/. Esta imagen es posible obtenerla mediante podman image pull quay.io/podman/hello:latest.

Para listar las imágenes locales:

[nihilipster@localhost:~]$ podman images
REPOSITORY                     TAG         IMAGE ID      CREATED       SIZE
docker.io/library/hello-world  latest      f1f77a0f96b7  6 weeks ago   22.5 kB
quay.io/podman/hello           latest      83fc7ce1224f  9 months ago  580 kB

Para la ejecución de un contenedor, lo cual implica el uso de una imagen para la creación de dicho contenedor:

  • Usando la imagen “Hello World” del Docker Hub:

    [nihilipster@localhost:~]$ podman run docker.io/library/hello-world
    
    Hello from Docker!
    This message shows that your installation appears to be working correctly.
    
    To generate this message, Docker took the following steps:
     1. The Docker client contacted the Docker daemon.
     2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
        (arm64v8)
     3. The Docker daemon created a new container from that image which runs the
        executable that produces the output you are currently reading.
     4. The Docker daemon streamed that output to the Docker client, which sent it
        to your terminal.
    
    To try something more ambitious, you can run an Ubuntu container with:
     $ docker run -it ubuntu bash
    
    Share images, automate workflows, and more with a free Docker ID:
     https://hub.docker.com/
    
    For more examples and ideas, visit:
     https://docs.docker.com/get-started/
    
  • Usando la imagen “Hello World” por parte del Podman:

    [nihilipster@localhost:~]$ podman run quay.io/podman/hello
    !... Hello Podman World ...!
    
             .--"--.
           / -     - \
          / (O)   (O) \
       ~~~| -=(,Y,)=- |
        .---. /`  \   |~~
     ~/  o  o \~~~~.----. ~~
      | =(X)= |~  / (O (O) \
       ~~~~~~~  ~| =(Y_)=-  |
      ~~~~    ~~~|   U      |~~
    
    Project:   https://github.com/containers/podman
    Website:   https://podman.io
    Desktop:   https://podman-desktop.io
    Documents: https://docs.podman.io
    YouTube:   https://youtube.com/@Podman
    X/Twitter: @Podman_io
    Mastodon:  @Podman_io@fosstodon.org
    

Para listar los contenedores creados localmente:

[nihilipster@localhost:~]$ podman container list --all
CONTAINER ID  IMAGE                                 COMMAND               CREATED         STATUS                     PORTS       NAMES
a7ae89d2e919  docker.io/library/hello-world:latest  /hello                31 minutes ago  Exited (0) 31 minutes ago              quirky_archimedes
5b5d17305326  quay.io/podman/hello:latest           /usr/local/bin/po...  29 minutes ago  Exited (0) 29 minutes ago              eager_buck

Para crear un contenedor, en base a una imagen ya existente localmente, y ejecutarlo:

[nihilipster@localhost:~]$ podman container list --all
podman container list --all
CONTAINER ID  IMAGE                                 COMMAND               CREATED         STATUS                     PORTS       NAMES
a7ae89d2e919  docker.io/library/hello-world:latest  /hello                31 minutes ago  Exited (0) 31 minutes ago              quirky_archimedes
5b5d17305326  quay.io/podman/hello:latest           /usr/local/bin/po...  29 minutes ago  Exited (0) 29 minutes ago              eager_buck
[nihilipster@localhost:~]$ podman container create --name hola-mundo --tty --interactive docker.io/library/hello-world:latest
108de2c4f8f0c7dfe5e5662a11cf9633044377b829a075b7b3117fb73041e582
[nihilipster@localhost:~]$ podman container list --all
CONTAINER ID  IMAGE                                 COMMAND               CREATED         STATUS                     PORTS       NAMES
a7ae89d2e919  docker.io/library/hello-world:latest  /hello                35 minutes ago  Exited (0) 35 minutes ago              quirky_archimedes
5b5d17305326  quay.io/podman/hello:latest           /usr/local/bin/po...  33 minutes ago  Exited (0) 33 minutes ago              eager_buck
108de2c4f8f0  docker.io/library/hello-world:latest  /hello                34 seconds ago  Created                                hola-mundo
[nihilipster@localhost:~]$ docker container start --attach --interactive hola-mundo

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (arm64v8)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

Podman Build🔗

A manera de ejemplo se puede obtener la definición de la imagen de un contenedor de Postgres ubicada en el archivo https://github.com/docker-library/postgres/blob/master/17/bookworm/Dockerfile, el cual establece la configuración del sistema operativo Debian Bookworm, la instalación de paquetes necesarios para Postgres y el inicio de una instancia de Postgres.

Se obtiene el repositorio https://github.com/docker-library/postgres de manera local:

[nihilipster@localhost:~]$ git clone https://github.com/docker-library/postgres
Cloning into 'postgres'...
remote: Enumerating objects: 6949, done.
remote: Counting objects: 100% (152/152), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 6949 (delta 91), reused 96 (delta 76), pack-reused 6797 (from 4)
Receiving objects: 100% (6949/6949), 1.05 MiB | 3.03 MiB/s, done.
Resolving deltas: 100% (3067/3067), done.

Es posible analizar el contenido de la carpeta que contiene la definición de la imagen (postgres/17/bookworm/Dockerfile):

[nihilipster@localhost:~]$ ls postgres/17/bookworm
Dockerfile  docker-ensure-initdb.sh  docker-entrypoint.sh

Para construir la imagen en base a la definición:

[nihilipster@localhost:~/postgres/17/bookworm]$ podman build --tag postgres-17.2-debian-bookworm:17.2 --file postgres/17/bookworm/Dockerfile postgres/17/bookworm/
STEP 1/25: FROM debian:bookworm-slim
STEP 2/25: RUN set -eux;
               groupadd -r postgres --gid=999;
               useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres;
               install --verbose --directory --owner postgres --group postgres --mode 1777 /var/lib/postgresql
--> Using cache 7661b8427129c25cb9e167388d69c692dbf4df3a8c983f3d2f95db22baaa4d87
--> 7661b8427129
STEP 3/25: RUN set -ex;
               apt-get update;
               apt-get install -y --no-install-recommends gnupg less;
               rm -rf /var/lib/apt/lists/*
--> Using cache 067dc670cfdca91760244d006d97c1f0ae28390903c3cc482ab6a9a87fa21a04
--> 067dc670cfdc
...
STEP 16/25: RUN install --verbose --directory --owner postgres --group postgres --mode 3777 /var/run/postgresql
--> 97a8c6f33d3e
STEP 17/25: ENV PGDATA /var/lib/postgresql/data
--> a2834416b2ae
STEP 18/25: RUN install --verbose --directory --owner postgres --group postgres --mode 1777 "$PGDATA"
install: creating directory '/var/lib/postgresql/data'
--> 66e8437c0b53
STEP 19/25: VOLUME /var/lib/postgresql/data
--> 1b2b23d09e16
STEP 20/25: COPY docker-entrypoint.sh docker-ensure-initdb.sh /usr/local/bin/
--> 7da6af2b31f7
STEP 21/25: RUN ln -sT docker-ensure-initdb.sh /usr/local/bin/docker-enforce-initdb.sh
--> 073edff9c118
STEP 22/25: ENTRYPOINT ["docker-entrypoint.sh"]
--> 66305a74ea10
STEP 23/25: STOPSIGNAL SIGINT
--> e9d0662eb9fd
STEP 24/25: EXPOSE 5432
--> e9d6aaf7f0d3
STEP 25/25: CMD ["postgres"]
COMMIT postgres-17.2-debian-bookworm:17.2
--> f8672473d8cc
Successfully tagged localhost/postgres-17.2-debian-bookworm:17.2
f8672473d8cc4620ad9e9133c0c7a72237ae459ea19092ad8711af4e4e3dbcf9

Para listar la nueva imagen creada:

[nihilipster@localhost:~]$ podman images
REPOSITORY                               TAG            IMAGE ID      CREATED             SIZE
localhost/postgres-17.2-debian-bookworm  17.2           f8672473d8cc  About a minute ago  468 MB
<none>                                   <none>         28ca6962a09f  4 minutes ago       146 MB
docker.io/library/debian                 bookworm-slim  0e1693e99bef  13 days ago         100 MB
docker.io/library/hello-world            latest         f1f77a0f96b7  6 weeks ago         22.5 kB
quay.io/podman/hello                     latest         83fc7ce1224f  9 months ago        580 kB

Una vez creada la imagen se pueden crear tanto contenedores se quieran.

Para borrar la imagen:

[nihilipster@localhost:~]$ podman image rm postgres-17.2-debian-bookworm:17.2
podman image rm localhost/postgres-17.2-debian-bookworm:17.2
Untagged: localhost/postgres-17.2-debian-bookworm:17.2
Deleted: f8672473d8cc4620ad9e9133c0c7a72237ae459ea19092ad8711af4e4e3dbcf9
...
Deleted: df77721c410d9adb49e50d56a29b68b5350ad283f763643e6d88a2492f3b6a7f

Podman Compose🔗

A manera de ejemplo se crearán los servicios de Postgres (como sistema gestor de base de datos) y pgAdmin (como aplicación web).

Para obtener la definición de los servicios desde el repositorio https://github.com/docker/awesome-compose:

[nihilipster@localhost:~]$ git clone https://github.com/docker/awesome-compose
Cloning into 'awesome-compose'...
remote: Enumerating objects: 2757, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 2757 (delta 0), reused 0 (delta 0), pack-reused 2753 (from 2)
Receiving objects: 100% (2757/2757), 7.70 MiB | 10.12 MiB/s, done.
Resolving deltas: 100% (1329/1329), done.

Creando los servicios mediante podman compose:

[nihilipster@localhost:~]$ podman compose --env-file awesome-compose/postgresql-pgadmin/.env --file awesome-compose/postgresql-pgadmin/compose.yaml up
>>>> Executing external compose provider "/opt/local/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<<

5317782ca43db2a68900d961fdf60641b54ba66efde344338f87a32390350285
Resolving "postgres" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/library/postgres:latest...
Getting image source signatures
Copying blob sha256:77b1b7588421aa8a2178678ef8042b65a9bfc5ade9fea7c685f5a674906db062
...
Writing manifest to image destination
5cee876dbf0f987c286deb4c3f226a87395980310ee5872add692aa491476e1d
Resolving "dpage/pgadmin4" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/dpage/pgadmin4:latest...
Getting image source signatures
Copying blob sha256:df48742512e2569243d02852bf7ec7d4cad64f076422454a989b51b27398c1da
...
[postgres] | PostgreSQL init process complete; ready for start up.
[postgres] |
[postgres] | 2025-03-09 02:10:21.525 UTC [1] LOG:  starting PostgreSQL 17.4 (Debian 17.4-1.pgdg120+2) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
[postgres] | 2025-03-09 02:10:21.525 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
[postgres] | 2025-03-09 02:10:21.525 UTC [1] LOG:  listening on IPv6 address "::", port 5432
[postgres] | 2025-03-09 02:10:21.526 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
[postgres] | 2025-03-09 02:10:21.527 UTC [57] LOG:  database system was shut down at 2025-03-09 02:10:21 UTC
[postgres] | 2025-03-09 02:10:21.529 UTC [1] LOG:  database system is ready to accept connections
[pgadmin]  | NOTE: Configuring authentication for SERVER mode.
[pgadmin]  |
[pgadmin]  | pgAdmin 4 - Application Initialisation
[pgadmin]  | ======================================
[pgadmin]  |
[pgadmin]  | postfix/postlog: starting the Postfix mail system
[pgadmin]  | [2025-03-09 02:10:27 +0000] [1] [INFO] Starting gunicorn 22.0.0
[pgadmin]  | [2025-03-09 02:10:27 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
[pgadmin]  | [2025-03-09 02:10:27 +0000] [1] [INFO] Using worker: gthread
[pgadmin]  | [2025-03-09 02:10:27 +0000] [113] [INFO] Booting worker with pid: 113
[postgres] | 2025-03-09 02:15:21.603 UTC [55] LOG:  checkpoint starting: time
...
[postgres] | 2025-03-09 04:48:19.210 UTC [1] LOG:  received fast shutdown request
[pgadmin]  | [2025-03-09 04:48:19 +0000] [1] [INFO] Handling signal: int
[postgres] | 2025-03-09 04:48:19.211 UTC [1] LOG:  aborting any active transactions
[postgres] | 2025-03-09 04:48:19.213 UTC [1] LOG:  background worker "logical replication launcher" (PID 60) exited with exit code 1
[postgres] | 2025-03-09 04:48:19.213 UTC [55] LOG:  shutting down
[postgres] | 2025-03-09 04:48:19.214 UTC [55] LOG:  checkpoint starting: shutdown immediate
[postgres] | 2025-03-09 04:48:19.219 UTC [1] LOG:  database system is shut down
[pgadmin]  | [2025-03-09 04:48:19 +0000] [113] [INFO] Worker exiting (pid: 113)
[pgadmin]  | [2025-03-09 04:48:19 +0000] [1] [INFO] Shutting down: Master

Accediento a pgAdmin disponible en :

pgadmin1.png

El ususuario y la contraseña fueron definidos por las variables de entorno PGADMIN_MAIL=your@email.com y PGADMIN_PW=changeit en el archivo awesome-compose/postgresql-pgadmin/.env.

pgadmin2.png

Sobre el parametro --env-file

Mediante --env-file podemos indicar las variables de entorno disponibles a los servicios. En este caso el archivo awesome-compose/postgresql-pgadmin/.env establece variables para la creación de la base de datos en Postgres y la autenticación en pgAdmin.

Tambien es posible conectar algún otro cliente de Postgres, en este caso DBeaver, teniendo en cuenta las variables de entorno POSTGRES_USER=yourUser, POSTGRES_PW=changeit y POSTGRES_DB=postgres definidas en el archivo awesome-compose/postgresql-pgadmin/.env.

dbeaver.png