Connection refused on docker container

后端 未结 6 919
面向向阳花
面向向阳花 2020-12-13 05:47

I\'m new to Docker and trying to make a demo Rails app. I made a dockerfile that looks like this:

FROM ruby:2.2
MAINTAINER marko@codeship.com

# Install apt         


        
6条回答
  •  难免孤独
    2020-12-13 06:29

    If you are using Docker toolkit on window 10 home you will need to access the webpage through docker-machine ip command. It is generally 192.168.99.100:

    It is assumed that you are running with publish command like below.

    docker run -it -p 8080:8080 demo
    

    With Window 10 pro version you can access with localhost or corresponding loopback 127.0.0.1:8080 etc (Tomcat or whatever you wish). This is because you don't have a virtual box there and docker is running directly on Window Hyper V and loopback is directly accessible.

    Verify the hosts file in window for any digression. It should have 127.0.0.1 mapped to localhost

提交回复
热议问题