Can't connect to Docker containers on OSX

后端 未结 2 1332
情话喂你
情话喂你 2021-02-04 07:43

I\'m new to Docker, and I can\'t seem to connect to any containers.

I installed Docker Toolbox. Now I\'m trying to get Shipyard to work. I followed the steps inside of a

2条回答
  •  孤独总比滥情好
    2021-02-04 08:29

    You can try and execute this command:

    docker-machine ip default
    

    it will return some thing like:

    192.168.99.100
    

    To get port number:

    docker ps
    

    Example output (scroll right to see port mapping):

    CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
    113346425f20        springio/spring1    "sh -c 'java $JAVA_OP"   34 minutes ago      Up 34 minutes       0.0.0.0:8080->8080/tcp   pensive_kirch
    

    To verify if it is working do:

    curl 192.168.99.100:8080

提交回复
热议问题