0

So I am running Jenkins in a docker image on mac with the following command:

docker run -p 8080:8080 -p 50000:50000 --name jenkins -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts-jdk11

So I can access from my local machine using localhost:8080, but from Jenkins I need to configure a plugin that requires to access an app on my local machine, but no idea how I can do that, so I was reading that I should use --network=host but with that I can't access localhost:8080 anymore.

Any idea what I am missing, I need to be able to connect Jenkins with an app on localhost and be able to access Jenkins as well.

zepol
  • 187
  • 5
  • 20
  • `--network` is only supported for Linux. Does this answer your question? https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach – ycr Nov 03 '22 at 22:05
  • Not really, it says that I should use "host.docker.internal" which AFAIK it's to access the docker container, and I need the other way around – zepol Nov 04 '22 at 00:02

0 Answers0