Docker Community Forums

Share and learn in the Docker community.

Docker-compose and postgres - not creatiing expected database

I am using ‘docker-compose’ to start a postgres database server

> version: "3.7"
> services:
>   db:
>     image: "postgres"
>     container_name: db
>     restart: always
>     ports:
>       - "5432:5432"
>     environment:
>       POSTGRES_USER: ian
>       POSTGRES_DB: goodday
>     volumes:
>       - gd-data:/var/lib/postgresql/data
> volumes:
>   gd-data:

This is running on Windows 10.

However, when I access the postgres database via my DBeaver database query tool, I can’t see a “goodday” database.

Is this a bug?

The problem is with ‘DBeaver’…

The initial login for its postgres connector only seems to support ‘postgres’ as the database.

To see other databases requires that the ‘Show all databases’ option be enabled

enter image description here