赞
踩
我们在docker中安装的mysql运行时报 mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
这是Docker的Seccomp安全限制问题
官方解释: Docker官网
在启动的命令后面添加 --security-opt seccomp=unconfined 忽略安全验证
docker run -d --name mysql -m 1g -p 3306:3306 -v /data/mysql/conf/my.cnf:/etc/my.cnf -v /data/mysql/data:/var/lib/mysql --privileged=true --restart=always --security-opt seccomp=unconfined -e MYSQL_ROOT_PASSWORD=123456 -e TZ=Asia/Shanghai mysql:8.0.21
配置dockers-compose.yml参数(这个方案首先需要你安装的有docker-compose才能使用)
version: '3'
services:
mysql:
image: mysql
container_name: mysql
# docker安全验证
security_opt:
- seccomp:unconfined
ports:
- 3306:3306
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。