Centos:fn start:挂载/ sys / kernel /安全失败:权限被拒绝
从https://github.com/fnproject/fn安装fn后
我以root
身份运行“ fn start
”
我得到以下错误
[root@localhost my-docker-app]# fn start sh: overlay: unknown operand mount: mounting none on /sys/kernel/security failed: Permission denied Could not mount /sys/kernel/security. AppArmor detection and --privileged mode might break. mount: permission denied (are you root?) time="2017-10-07T09:42:36Z" level=error msg="couldn't ping db" error="unable to open database file" url=/app/data/fn.db time="2017-10-07T09:42:36Z" level=fatal msg="Error initializing datastore." error="unable to open database file" 2017/10/07 11:42:37 error: proce ssed finished with error exit status 1
任何帮助?
Centos版本和fn版本
[root@localhost my-docker-app]# cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" [root@localhost my-docker-app]# fn version Client version: 0.4.7 ERROR: Get http://localhost:8080/version: dial tcp [::1]:8080: getsockopt: connection refused [root@localhost my-docker-app]#
你需要禁用安全增强型Linux(SELinux),它是由此造成的。
以root身份执行以下命令,临时禁用selinux
$ setenforce 0
要么
- vi / etc / sysconfig / selinux
- 如下所示更改SELINUX的值
- SELINUX =禁用
- 重启
- 在Linux上的Docker,但在里面运行Windows
- node.js使用websocket附加一个docker容器
- Amazon EFS和Docker – 创build映像时出错
- 在Docker中,Debian httpredir镜像系统不可靠/不可用?
- 如何在Docker中使用dynamic生成的Nginxconfiguration文件?
- Docker – 是否有可能重新创build容器而不重新创build使用它的容器
- Docker:如何从Github存储库上的非主分支构build一个图像
- 如何在docker上运行gunicorn
- 更正postgres docker容器中tcp_keepalives设置的方法