I would like to have a way to enter into the Postgresql container and get a data dump from it.
Use the following command from a UNIX terminal:
docker exec <container_name> pg_dump <schema_name> > backup
The following command will dump only inserts from all tables:
docker exec <container_name> pg_dump --column-inserts --data-only <schema_name> > inserts.sql