PostgreSQL's default configuration is designed for a laptop with 1 GB of RAM - shared_buffers at 128 MB, work_mem at 4 MB, effective_cache_size at 4 GB. Running Postgres in Docker with these defaults means wasting your server's resources.
Dockerized Postgres also needs persistent storage that survives container recreation, a backup strategy that does not depend on SSH access, and monitoring that integrates with your container orchestrator's health check system.