Running a Jenkins image in my container which is bound to the host port 9090
sudo docker run -itd -p 9090:8080 -p 50000:50000 --name=myjenkins -t jenkins-custom /bin/bash
The output of running $docker port myjenkins
50000/tcp -> 0.0.0.0:50000
8080/tcp -> 0.0.0.0:9090
I can also see the binding from the host perspective ps -Af | grep proxy
root 15314 15194 0 17:52 ? 00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 50000 -container-ip 172.17.0.2 -container-port 50000
root 15325 15194 0 17:52 ? 00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 9090 -container-ip 172.17.0.2 -container-port 8080
After starting my jenkins server i try connect to the container using the host ip and the forwarded port (9090).
I'm new to Docker so may have missed something however would appreciate suggestions
Update: including dockerfile
From local-artifiactory/jenkinsci/jenkins:2.9
ENV java_opts="-Xmx8192m"