Skip to content
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

数据没了 #2294

Open
Adam-cell-tech opened this issue Nov 23, 2024 · 11 comments
Open

数据没了 #2294

Adam-cell-tech opened this issue Nov 23, 2024 · 11 comments

Comments

@Adam-cell-tech
Copy link

莫名其妙数据全部没了

@Adam-cell-tech
Copy link
Author

ls /showdoc_data/html 有文档但是 这个目录中没得数据

@star7th
Copy link
Owner

star7th commented Nov 25, 2024

我不知道你说的“这个目录中没得数据”是什么意思,是空目录,还是说里面的数据库文件是初始化状态。
感觉你没挂载数据,导致容器重启后,数据就被还原了。也就是说,你一开始就没安装对

@Adam-cell-tech
Copy link
Author

Uploading image.png…
我按照docker启动教程一步一步来的。/showdoc_data/html/ 但是这个目录下数据还是空的

@Adam-cell-tech
Copy link
Author

image

@star7th
Copy link
Owner

star7th commented Nov 25, 2024

空目录的话,说明是你的服务器特殊,你的服务器可能有安全进程禁止了写docker挂载问题。比如说检查下selinux之类的问题。一般人的服务器是ok的

@star7th
Copy link
Owner

star7th commented Nov 25, 2024

我看截图,你登陆的是user用户? 我不清楚这会不会带来权限问题。尝试用root用户

@star7th
Copy link
Owner

star7th commented Nov 25, 2024

这个是基础docker环境挂载问题。并不是showdoc问题。你使用其他docker镜像大概率也会挂载失败。你可以安装其他docker镜像容器来比较下如何挂载才能成功

@Adam-cell-tech
Copy link
Author

容器重启后数据没有丢失。正常情况下/showdoc_data/html/ 这个目录下是有数据文件的吧

@star7th
Copy link
Owner

star7th commented Nov 25, 2024

正常情况下是有数据文件的。你现在的数据都是临时保存在容器内部的。下次docker run可能就没了。

@Adam-cell-tech
Copy link
Author

image
image
image
我挂载了Docker 数据卷。这样子应该没问题了吧

@star7th
Copy link
Owner

star7th commented Nov 25, 2024

理论上也行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants