
image.png
啟動(dòng)Mariadb或者M(jìn)ongo的,run了發(fā)現(xiàn)容器就自己死掉了
下面是日志信息
$docker logs db-1
chown: changing ownership of '/proc/1/fd/1': Permission denied
chown: changing ownership of '/proc/1/fd/2': Permission denied
about to fork child process, waiting until server is ready for connections.
forked process: 19
ERROR: child process failed, exited with error number 1
chown: changing ownership of '/proc/1/fd/1': Permission denied
chown: changing ownership of '/proc/1/fd/2': Permission denied
about to fork child process, waiting until server is ready for connections.
forked process: 18
ERROR: child process failed, exited with error number 1
找了半天解決方案如下:
1.http://www.cnblogs.com/YDDMAX/p/6184100.html
2.在mongo官方文檔中,也有這樣得一行說明

image.png
在關(guān)閉了SELINUX后,終于跑起來啦。

image.png
WHY?
我一直都有一個(gè)只想解決問題,從不去知所以然,不過這次我要去看看所以然了