some task that you can do using docker instead install the tool directly in your computer
dump data from external database, important add the network of the container
docker run -it --rm -v ${PWD}:/tmp --network project_network_default postgres pg_dump -c -f /tmp/dump.sql postgresql://postgres:postgres@postgres:5432/postgres
dump just a table as inserts file, also on conflict do nothing so if found existent values would continue the script
docker run -it --rm -v $PWD:/tmp --network project_network_default postgres pg_dump --table=proof --column-inserts --data-only --on-conflict-do-nothing -f /tmp/table_data_patch.sql postgresql://postgres:postgres@postgres:5432/postgres
Deletes all the data, compilations, dumps, networks, its like a clean brand new docker installation, use with safety
docker system prune -a