2

I've been following a tutorial to try and learn docker, however, for some reason I can't seem to access any of the ports it's meant to be opening. For some reason it just times out. Where can I look to get more details on why I'm not able to access this, or otherwise what can I do access the docker container.

Steps done so far:

$ docker run hello-world # works fine
$ docker run -d -P --name static-site prakhar1989/static-site # works and returns a docker container id
$ docker port static-site
443/tcp -> 0.0.0.0:32768
80/tcp -> 0.0.0.0:32769

Then I access one of the host through http://localhost:32768/ but nothing. After reinstalling it doesn't even time out anymore and just says the site can't be reached.

Also, I tried accessing the container directly on those ports but without any success.

2 Answers 2

0

For HTTP use port redirecting to port 80, i.e. access the site with http://localhost:32769.

HTTPS doesn't seem to be configured in this container.

1
  • Sorry, I did try both, neither work. The connection is just refused
    – Hosh Sadiq
    Commented May 29, 2016 at 6:08
0

I solved it with a reboot :/

I was having the same problem on a fresh Docker 1.12 install on Ubuntu 15.10. After going through https://prakhar.me/docker-curriculum/, and I wasn't able to connect to the sample containers. The http connection would just hang.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .