-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker 在Centos 7 环境下启动报错 #2
Comments
看起来是文件夹访问权限问题,因为 CentOS 默认是打开 SELinux 的,有很多情况与这个有关,不过从截图中看不出来。 我在 VirtualBox 中安装了 CentOS 7 可以在主机 easy-mock 目录和 docker 内 easy-mock 目录执行命令 也可以参考一下这些方式看看是否有帮助 |
通过
现在能想到的做法是在主机上和容器内的 easy-mock 目录下 对于不挂在 logs 目录可以启动成功,有可能是 easy-mock 程序本身会判断文件夹是否存在,不存时自动创建或者不记录日志,没有参与 easy-mock 程序开发,具体就不太清楚了 😂。 |
const logDir = path.join(__dirname, '../logs')
if (!fs.existsSync(logDir)) {
mkdirp.sync(logDir)
} |
😄 果然做了判断,不过虽然不挂载 logs 文件夹可以用,但是日志文件保存调试就不太方便了 |
尝试在虚拟机的 Centos 7 系统上使用同样的配置部署,成功了。 |
👌 待今天下班后把家里机器装成 CentOS 7 尝试一下。 |
家里机器 CentOS 7 没什么问题,十一长假没太关注,等稍有空去阿里云试一下。 |
后续在我自己的服务器尝试了下,也没有报错出现,issue 暂时关闭了,有后续讨论我们可以再打开。 |
好的。如解决报错,我会另外补充。 在2017年12月01日 09:02 ,DuanPengfei写道: 后续在我自己的服务器尝试了下,也没有报错出现,issue 暂时关闭了,有后续讨论我们可以再打开。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
|
遇到同样的问题...不挂载logs才能启动...emmmmmm |
服务器环境:
Linux centos7 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Docker version 17.09.0-ce, build afdb6d4
docker-compose version 1.16.1, build 6d1ac219
报错如下:
在 windows 环境下启动正常
The text was updated successfully, but these errors were encountered: