-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Running with --security-opt apparmor=unconfined or disabling apparmor in GRUB mitigates the issue.
Setting unix_socket_directories to /tmp did not help. The same issue is observed with the 16-alpine and 18-trixie images.
Command Line output
root@butler:~# docker run --rm -it -e POSTGRES_PASSWORD=[REDACTED] postgres:16-trixie
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
waiting for server to start....2025-10-17 17:14:35.791 UTC [48] LOG: starting PostgreSQL 16.10 (Debian 16.10-1.pgdg13+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2025-10-17 17:14:35.791 UTC [48] LOG: could not create Unix socket for address "/var/run/postgresql/.s.PGSQL.5432": Permission denied
2025-10-17 17:14:35.791 UTC [48] WARNING: could not create Unix-domain socket in directory "/var/run/postgresql"
2025-10-17 17:14:35.792 UTC [48] FATAL: could not create any Unix-domain sockets
2025-10-17 17:14:35.793 UTC [48] LOG: database system is shut down
stopped waiting
pg_ctl: could not start server
Examine the log output.
Metadata
Metadata
Assignees
Labels
No labels