mqtt:
image: emqx/emqx:5.7.1
container_name: emqx
ports:
- “1883:1883”
- “8083:8083”
- “8084:8084”
- “8883:8883”
- “18083:18083”
volumes:
- /docker/emqx/data/:/opt/emqx/data
- /docker/emqx/log/:/opt/emqx/log
privileged: true
network_mode: “host”
network_mode 为host报错,默认不报错
报错内容:
hostname: Name or service not known
WARNING: Default (insecure) Erlang cookie is in use.
WARNING: Configure node.cookie in /opt/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIE
WARNING: NOTE: Use the same cookie for all nodes in the cluster.
EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
EMQX_NODE__NAME [node.name]: emqx@
Kernel pid terminated (application_controller) (“{application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{‘EXIT’,nodistribution}}}}},{kernel,start,[normal,]}}}”)