How to access a docker container running on MacOSX from another host?

后端 未结 5 544
时光取名叫无心
时光取名叫无心 2021-02-04 15:25

I\'m trying to get started with docker and want to run the Ubiquiti video controller. I have installed Docker Toolbox and managed to get the container to run on my Yosemite host

5条回答
  •  误落风尘
    2021-02-04 15:38

    This question main use case would be to access the applications running in the container from host(Mac) machine or other machines in the host(Mac) network

    Once the container application has been started and exposed as below

    docker run -d -p 8080 <>
    

    Then find the mapping between the host(Mac) port with container port as below

    docker port <>
    sample output : 8080/tcp -> 0.0.0.0:32771
    

    now access the container application as host(Mac IP):32771 from any machine in your host(Mac) network

提交回复
热议问题