A database container runs PostgreSQL alongside an application and can initialize supporting data when it starts. It gives developers a repeatable local database environment for storing application data and inspecting it through CloudBeaver. section 3.2.2
A practical PostgreSQL container setup can provide:
- A PostgreSQL service defined in a Docker Compose file. section 3.2.2
- A connection that CloudBeaver can use to view database contents. section 3.2.2
Minimal PostgreSQL service
A Compose service can use the PostgreSQL image and configure administrative credentials through POSTGRES_USER and POSTGRES_PASSWORD. A named volume preserves the database files outside the container's transient lifecycle.
