Created
October 27, 2022 12:47
-
-
Save mrroot5/a3180807f556d856c941ea8e4b60370a to your computer and use it in GitHub Desktop.
Import postgres sql script inside docker container from host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat <sql_name>.sql | docker exec -i <container_name> /usr/bin/psql -p <database_user_password> -U <database_user> -d <database_name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment