Running docker container on localhost in ShinyProxy

Hello,

I need to run docker container on localhost inside Shinyproxy (to access Mysql on localhost).
There is an older unresolved? question about the same issue.
I have tried including docker-network: localhost into application.yml but with no luck.
Any help appreciated!

Hi kutykajot,

if your localhost have static ip you can use that IP to access MySql (but configure MySql that it can be accessible over ip port). No need for docker-network settings.

Regards
Dusan

Hi Dusan,

so basically I should add the ip address of my computer/server and a default mysql port for the connection inside shinyapp? Thanks!
Regards,

Jiri

Yep. That is the simplest way.

It can produce some security questions but it is fastest way to fetch data from DB.

1 Like

Thanks. After thinking about it for a while, I’d still prefer fot the docker to run on localhost. Since the shinyproxy will probably sit on the same server with mysql database after deployment, it’d would be better this way than poking unnecessary holes in firewall for “distant” access.

1 Like

From the top of my head, a docker-compose solution might allow me such arrangement, right?

Possibly. I have no experience with docker-compose.

1 Like

I take my argumentation back, after discussing it with admins & server guys. Though docker-compose might get handy, forcing the docker to run on locahost and relying on it is not a robust solution. Well, live to learn. Thanks for your help Dusan.