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

重启计算机后,运行docker container,进入install配置,lsky相关历史数据全部消失 #13

Closed
tyePhDCandy opened this issue Nov 12, 2022 · 3 comments

Comments

@tyePhDCandy
Copy link

tyePhDCandy commented Nov 12, 2022

现状:我用的windows 10,用docker,在本机上 成功部署了lsky pro v2.x,在install配置界面,采用sqlite数据库,能够正常进入localhost:8081进行设置、图片上传,连picgo与lsky的互联都搞好,并且可以正常使用。在docker desktop界面,可以自由的开启、关闭lsky container,lsky功能没有影响,上传图片保存完好。

症状:但是,重启计算机之后,重新运行docker container(lsky pro),进入localhost:8081,界面显示:进行install配置。进行install配置后,没有数据,啥都没了。

问题:重启计算机后,会导致docker container内部的lsky pro重置状态吗?该怎么解决这个问题呢?谢谢。

@HalcyonAzure
Copy link
Owner

尝试了下,这个BUG确实是可以复现的,同时在Linux系统上则不会,也许先用MySQL或者其他的数据库方案替代下?

@tyePhDCandy
Copy link
Author

该问题得到了解决。原因可能为:

  • docker volume mapping (docker -v <path inside local machine> : <path inside docker>)。对于windows 10 with wsl2 系统来说,<path inside local machine>需要特别注意。
  • -d参数

我的docker run code(成功版本):

docker run -d --name lsky -p 8090:80 -v \\wsl$\Ubuntu\var\project\lsky_personal:/var/www/html halcyonazure/lsky-pro-docker:latest

@HalcyonAzure
Copy link
Owner

学到了👍

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