Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An example for tunneling support #5

Open
KPACHbIuLLIAnO4 opened this issue Feb 6, 2017 · 2 comments
Open

An example for tunneling support #5

KPACHbIuLLIAnO4 opened this issue Feb 6, 2017 · 2 comments

Comments

@KPACHbIuLLIAnO4
Copy link

HI.

Sometimes DB servers are hidden from the outside world and can be reached only within ssh tunnels. This docker image doesn't see my local tunnel set up in advance, therefore I cannot open a connection from pgadmin running inside docker.

Can you please add the example of docker network configuration or command line string for this image to support local tunnels?

Thanks.

@thaJeztah
Copy link
Owner

Sorry for the late reply; hm, I'm not sure I have a direct answer to this, as I don't use a similar setup myself. It should probably work if your container is using --network=host (i.e. uses the "hosts" network stack), but this can have some security implications. This question on StackOverflow may also be helpful http://stackoverflow.com/questions/17770902/forward-host-port-to-docker-container

@sebbarg
Copy link

sebbarg commented Jan 3, 2018

Here's is how I do it when having pgadmin (in the container) connecting to postgres running on the local host (i.e. not inside a container):

https://gist.github.com/sebbarg/b75e3b2803a20cbaf2c3f53d53f920ae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants