赞
踩
net.ipv4.ip_local_port_range = 1024 65535
bash-5.0$ sudo sysctl -p
sysctl: error setting key 'net.ipv4.ip_local_port_range': Read-only file system
sysctl: error setting key 'fs.file-max': Read-only file system
sysctl: error setting key 'fs.nr_open': Read-only file system
docker 限制了对容器中 /proc
和 /sys
的访问
docker-compose 加入了sysctls
选项来解决这个问题
emqx:
image: "emqx/emqx:4.3.11"
sysctls:
- net.ipv4.ip_local_port_range=1024 65535
用特权模式启动
docker-compose.yml
文件version: "3.1"
services:
emqx:
image: "emqx/emqx:4.3.11"
privileged: true #加入这一行
sysctl -p
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。