How to use the host IP as the connection to an external server in a docker container?

32 Views Asked by At

I have a docker container running on a Redhat 9 server. The Redhat IP address has been granted access to a SQL Server database in our private network. But the docker container cannot access the SQL Server, I imagine because it has a different IP address.

I need the docker container to somehow use the IP of the Redhat 9 server to connect to the SQL Server because the docker container with its unique IP cannot connect to the SQL Server.

How would one go about configuring this in docker?

0

There are 0 best solutions below