Access PostgreSQL database command line terminal in a container
1 | sudo docker exec -it [CONTAINER NAME] psql -U postgres |
Commands:
1 | \c [DATABASE NAME] ~ connects to a database |
You can also run this as a shell script
1 | #!/bin/bash |
Access PostgreSQL database command line terminal in a container
1 | sudo docker exec -it [CONTAINER NAME] psql -U postgres |
Commands:
1 | \c [DATABASE NAME] ~ connects to a database |
You can also run this as a shell script
1 | #!/bin/bash |