windows docker-machine port
世界只因有你
世界只因有你 2017-04-24 15:59:09
0
1
742

windows如何设置 docker-machine 的port,默认是2375


这个端口,怎么改

世界只因有你
世界只因有你

reply all(1)
为情所困

There are two modification methods:

1. Specify it directly when creating

docker-machine Supports parameters. You can directly specify its port data when creating:

docker-machine create -d virtualbox \
    --engine-opt host=tcp://0.0.0.0:12345
    sandbox

It is recommended to take a look at the official website documentation: https://docs.docker.com/machine/reference/create/

There are some parameters with Chinese characteristics that should be added initially, such as --registry-mirroradding Alibaba Cloud Accelerator and the like.

  1. Manually modify the created docker host

It is more complicated to modify the already established host. You need to modify the /var/lib/boot2docker/profile 文件,以及修改本机的 ~/.docker/machine/machines/xxxxx/config.json file in the virtual machine at the same time.

If the modification is incorrect, the connection will not be possible, and docker-machine upgrade 之后这些配置容易丢失。所以尽量使用之前在 create is the way to add parameters.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!