首先文章中,docker-compose使用的是--net=host 模式,这个模式下端口是没办法映射的,因为网络环境,我需要把端口映射到特定端口,比如 8080:9030,这样子就会报错。
这是我现在的,这种情况下没办法端口映射,用docker run也是一样的。
version: "3"
services:
fe:
image: apache/doris:doris-fe-2.1.7
hostname: fe
environment:
- FE_SERVERS=fe1:10.56.135.52:8010
- FE_ID=1
ports:
- 8030:8030
- 8031:9030
volumes:
- /ssd2/data/fe/doris-meta/:/opt/apache-doris/fe/doris-meta/
- /ssd2/data/fe/log/:/opt/apache-doris/fe/log/
network_mode: host
be:
image: apache/doris:doris-be-2.1.7
hostname: be
environment:
- FE_SERVERS=fe1:10.56.135.52:8010
- BE_ADDR=10.56.135.52:8050
ports:
- 8040:8040
volumes:
- /ssd2/data/be/storage/:/opt/apache-doris/be/storage/
- /ssd2/data/be/script/:/docker-entrypoint-initdb.d/
depends_on:
- fe
network_mode: host
于是我注释了 #network_mode: host
改用端口映射的方式,然后就报错了。
RuntimeLogger 2024-12-04 11:57:16,107 INFO (main|1) [DorisFE.start():167] Doris FE starting...
RuntimeLogger 2024-12-04 11:57:16,113 INFO (main|1) [FrontendOptions.analyzePriorityCidrs():194] configured prior_cidrs value: 10.56.135.0/24
RuntimeLogger 2024-12-04 11:57:16,116 ERROR (main|1) [FrontendOptions.initAddrUseIp():82] ip address range configured for priority_networks does not include the current IP address