Skip to content

TLS config prevents start of container #8

@fwilhe

Description

@fwilhe

What happened:

Build and start the container from d30ef22

podman build -t pg:tls .
podman run -it --rm -e POSTGRES_USER=glvd -e POSTGRES_DB=glvd -e POSTGRES_PASSWORD=glvd -p 5432:5432 localhost/pg:tls

Start fails with this log:

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....2024-05-16 11:33:08.174 UTC [42] LOG:  starting PostgreSQL 15.7 (Debian 15.7-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-05-16 11:33:08.177 UTC [42] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-05-16 11:33:08.186 UTC [45] LOG:  database system was shut down at 2024-05-16 11:33:07 UTC
2024-05-16 11:33:08.192 UTC [42] LOG:  database system is ready to accept connections
 done
server started
CREATE DATABASE


/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/create-certificate.sh
..
req: Can't open "/var/lib/postgresql/data/pgdata/server.key" for writing, No such file or directory
cp: cannot create regular file '/var/lib/postgresql/data/pgdata/.': No such file or directory

38f4aa6 did not help

What you expected to happen:

Instance can boot with tls enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions