How to backup a PostgreSQL database running in docker-compose

A quick reference document on running commands within docker and getting files out of docker.