Reputation: 71
I have a Hasure GraphQL engine installed through a droplet installation on Digital Ocean.
Even though I gained root access to the droplet instance using ssh I can't connect to the instance inside Hasura droplet docker image.
What are the list of commands to run to connect to postgres instance inside docker image??
Upvotes: 3
Views: 466
Reputation: 1432
Once you ssh
ed into your Digital Ocean instance, list all running docker containers:
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
....................................................
Take note of the CONTAINER ID
of the container in question.
Then you can have a terminal session inside of the container, and use psql
to connect to the database:
docker exec -it 05b3a3471f6f bash
root@a5sd22v5-# psql -U postgres
This SO question is more relevant.
Upvotes: 2