I install ubuntu-14.10 to docker 1.2.0, build fa7b24f
I install ubuntu container following command
docker run -t -i ubuntu /bin/bash
Next a file of included application was prepared in container.
RUN apt-get update
RUN apt-get -y install ruby1.9.3
RUN gem install bundler
ADD . /src
RUN cd /src && bundle install
CMD cd /src && rackup -p4567
And container, build, please, an image file was made by following command.
docker build -t sample-app .
A completed image was carried out by following command.
docker run -p 4567:4567 -t sample-app
INFO WEBrick 1.3.1
INFO ruby 1.9.3 (2013-11-22) [x86_64-linux]
INFO WEBrick::HTTPServer#start: pid=8 port=4567
And I accessed container using wget from localhost, but you couldn’t access.
wget -qO- http://localhost:4567/
You can’t talk to the container’s 0.0.0.0, you need the container’s server to listen to 0.0.0.0 - If i’m right, your server is not listening on any ethernet device that you can access from outside the container.
ip address of this container is 172.17.0.28
When ping is performed, this IP address receives a response.
But even if wget -qO- http://172.17.0.28:4567/ is carried out, it’s irresponsive.
Why isn’t it possible to do access of port 4567 of container?