now to use datagrip on db inside a docker container

已完成

Is there a way to use datagrip on a sql server (like postgressql) that is running inside a  docker container?

I can use psql client with the following command-line

sudo docker exec -it mickyscontainer psql -d mousedb -u goofy

 

 

 

 

0

Hi,

It should be. Are you getting a specific error when trying to connect? If so, what’s the message? Also, have you exposed the port for use by DataGrip?

0

Hi Anastasia,

 

I hadn't done much to even get an error message.  I did use the docker interface in datagrip to run bash within the container and then run psql to get the basic text-based view of table contents.

I'm early in learning how to use datagrip.

Here is where I started to get lost.

1) went to Database Explorer and clicked [+]

2) saw for Data Source [postgresql] and selected it. Wondering when/how to tell datagrip it's in a docker image.  What I'm getting from you a bit  is that if i get a port externally available, datagrip won't need to know that postgresql is running in a docker image.

Let me try looking at exporting the port and then use it in the Port: [ 5432] field.

 

 

 

 

0

Yes, that was all i had to do is export to postgressql port number and datagrip database explorer/data source was able to connect once i supplied the port number.

So I'm good to go.

 

0

Hi,

Glad to hear it! Feel free to reach out if you have any more questions.

0

请先登录再写评论。