naveen kumar
naveen kumar

Reputation: 188

how to connect to an application from inside a docker container?

I have created a docker container which is running on a particular VM in azure (or consider any cloud).That container has a java/nodejs/Csharp application running which needs to access Jenkins server which is running in a company network.

So will i be able to access jenkins from that docker container?If no,please provide a solution on how to access.

Upvotes: 0

Views: 1274

Answers (1)

Flowkap
Flowkap

Reputation: 799

You can use --network=host option to let your container run in the same network context as the server you're trying to connect to if it's accessible from the container host.

Of course you should specify a specific network or routes if possible.

https://docs.docker.com/engine/reference/run/#network-settings

Upvotes: 1

Related Questions