Skip to content

Instantly share code, notes, and snippets.

@mrroot5
Created October 27, 2022 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrroot5/a3180807f556d856c941ea8e4b60370a to your computer and use it in GitHub Desktop.
Save mrroot5/a3180807f556d856c941ea8e4b60370a to your computer and use it in GitHub Desktop.
Import postgres sql script inside docker container from host
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