优化Docker构建和部署逻辑,改进配置持久化#1268
Open
HexStan wants to merge 3 commits intojuewuy:devfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改点:
/etc/ShellCrash另外存一份副本。sc-init,如果启动容器时/etc/ShellCrash不存在或者为空,就把副本拷贝过去。/etc/ShellCrash/configs改成/etc/ShellCrash。这样可以保留所有的用户配置,不受删除容器的影响,在我的设备上可以按预期工作。
但是,这样修改之后会有个小问题,就是镜像的更新和程序本体的更新脱钩了。对于新部署的用户来说是没问题的,但是以后即使更新镜像也不会更新已经挂载了持久化目录的程序本体。我能想到的方案有以下两个:
更新与支持来更新。希望作者可以想出更完善的解决方案