docker容器设置SEATA_IP=xxx不起作用,注册的还是172开头的docker内网ip?

宿主机是macOS系统,ifconfig查看网卡,没有默认的docker0网卡(linux上有)。

docker network ls

NETWORK ID     NAME             DRIVER    SCOPE

c95f5e448fc6 bridge bridge local

a285516fcc44 docker_default bridge local

0ee87be54f44 host host local

38fb15183848 none null local

docker-compose文件

 45   seata:

46 image: seataio/seata-server:1.3.0

47 hostname: seata-server

48 ports:

49 - "8091:8091"

50 - "7091:7091"

51 volumes:

52 - ./seata/resources:/seata-server/resources

53 environment:

54 - SEATA_IP=192.168.2.2

55 - SEATA_PORT=8091

56 - STORE_MODE=file


回答:

docker run 附加 --net=host

以上是 docker容器设置SEATA_IP=xxx不起作用,注册的还是172开头的docker内网ip? 的全部内容, 来源链接: utcz.com/p/945070.html

回到顶部