-
Overview
通过
client
容器连接server
容器出现如下问题:docker: Error response from daemon: Cannot link to /clickhouse_20.8.13.15, as it does not belong to the default network
clickhouse_20.8.13.15
是我自定义的clickhouse
server
容器。 -
Analysis
理解Creating network “projectName_default” with the default driver
log说的很明白,因为client容器与server容器不在同一份network中。
$ docker network ls $ docker inspect networkId
找出server所在网略,然后启动client时候通过
--network networkId
加入到对应网络中。 -
--link
--link <name or id>:alias
From docker docs,
--link
flag is a legacy feature of Docker, it may eventually be removed. -
--host
--host # Daemon socket to connect to
-
References
(20210302已解决)clickhouse docker, as it does not belong to the default network
猜你喜欢
转载自blog.csdn.net/The_Time_Runner/article/details/114434710
今日推荐
周排行