0

so I have my project which when installed on host makes login page available (via embedded Tomcat server) as

https://127.0.0.1:8443/

Now I installed this in ubuntu container and for installation the command I used was

docker run -it --name lp --dns=122.17.213.214 --dns=122.26.00.10 --dns-search=corp.sfc.san -p 8080:8443 -v ~/Downloads/logs:/logs -v ~/Downloads:/installers ubuntu /bin/bash

When I did that, I was not able to reach this on my host browser, what I tried was

https://my-docker-machine-ip:8443/ # I am using Mac OSX

Next, I thought to provide exact mapping and I tried

docker run -it --name lp --dns=122.17.213.214 --dns=122.26.00.10 --dns-search=corp.sfc.san -p 192.168.99.100:8443:8443 -v ~/Downloads/logs:/logs -v ~/Downloads:/installers ubuntu /bin/bash  

and tried the same URL again, but no luck

What I see is HTTP 404 from Apache. What am I missing?

However within the container, I see log that tells me that server is running

11 May 2016 22:19:19,166 [INFO ] [main] EmbeddedWebServer    | Starting tomcat server on port 8443 ...

1 Answer 1

1

The syntax is -p hostPort:ContainerPort. Your first example had the right syntax but the 'wrong' port (compared to what you were expecting).

Instead of:

docker run -it --name lp --dns=122.17.213.214 --dns=122.26.00.10 --dns-search=corp.sfc.san -p 8080:8443 -v ~/Downloads/logs:/logs -v ~/Downloads:/installers ubuntu /bin/bash

Use:

docker run -it --name lp --dns=122.17.213.214 --dns=122.26.00.10 --dns-search=corp.sfc.san -p 8443:8443 -v ~/Downloads/logs:/logs -v ~/Downloads:/installers ubuntu /bin/bash

Then

https://my-docker-machine-ip:8443/ # I am using Mac OSX

should work.

1
  • I see see the same issue
    – daydreamer
    Commented May 11, 2016 at 23:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.