Connect to docker-machine using 'localhost'

后端 未结 3 855
伪装坚强ぢ
伪装坚强ぢ 2020-12-24 15:18

There are certain features, like JavaScript service workers without https, that only work on localhost, but when I run my app inside a docker container, using docker-compose

3条回答
  •  死守一世寂寞
    2020-12-24 15:50

    The easiest way is to make port forwarding from the VBox

    Settings->Network->Adapter 1->Port Forwarding

    then add Name, in host add 127.0.0.1(for local host) then proper port bindings and restart the VM.

提交回复
热议问题