Started by sumit JalanAug 31, 2021

Open
From inside of a Docker container, how do I connect to the localhost of the machine?

1 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 1 VIEWES SHARE

So I have a Nginx running inside a docker container, I have a mysql running on localhost, I want to connect to the MySql from within my Nginx. The MySql is running on localhost and not exposing a port to the outside world, so its bound on localhost, not bound on the ip address of the machine.

Is there any way to connect to this MySql or any other program on localhost from within this docker container?

0 Replies

You must be Logged in to reply
Trending Categories
95
Software18
DevOps35
Frontend Development19
Backend Development17
Server Administration13
Linux Administration16
Data Center20
Sentry22
Terraform19
Ansible19
Docker19
Penetration Testing12
Kubernetes13
NGINX14
JenkinsX16
Jenkins20
SSL10
Ethical-Hacking10
Python12
NodeJs15
RedHat14
Github18
AngularJs15
Google Cloud Platform (GCP)6
SonarQube13
Amazon Web Service (AWS)13
VMware17
Blockchain12
Snipe-IT7