I have a dump.sql file that I would like to load with docker-compose.
docker-compose.yml:
services: postgres: environment: POSTGRES_DB: my_d
After the docker-compose up, do docker ps it will give you a list of active docker containers. From that, you can get the container ID.
Then,
docker exec -i {CONTAINER_ID} psql -U {USER} < {.SQL FILE}