Issue
I want to setup a dev environment on a Ubuntu container.
I have run the container as follow:
docker run -tid \
--name auto-server \
--rm \
--volume data:/home/ubuntu \
--publish 8080:8080 \
--cap-add=NET_ADMIN \
--cap-add=NET_RAW \
ubuntu:latest
Within, I have installed Jenkins and its dependencies.
The 8080 port seems to be ok on the container:
The Jenkins daemon also, here is the output I have requesting it in my container, here is what i get when I request http://localhost:8080:
My problem is how to access Jenkins web UI from my browser.
Solution
--network
bridge
already is the default, unless specified otherwise.
Just add EXPOSE 8080
to the Dockerfile
(or script) and it should work.
Answered By - Martin Zeitler