Categories
Docker postgres

docker and postgres sql

Back to fedora.  up to 31.
loading a sql file into a docker postgres db from the command line.
(see my github docker-compose for the postgres db setup)
note:
/data/raw is my shared volume with postgres;
some-postgres is the postgres container name
data2.sql is a sql txt file.


sudo docker exec -it  some-postgres psql  -U postgres  -d sqldb -f /data/raw/data2.sql