Finish the script for deploying in docker #24
Merged
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.
In this commit, we finish the script for deploying in docker. We found that
systemd
can not be used in docker, so we useSys V Init
to start a service in docker.This commit is related with #8.
Those below are not finished yet:
通过设置
deployWithDocker
可以在docker
中进行部署。配置文件中提供了相关的参数的说明。
由于在
docker
中如果不使用--privileged=true
进行创建是不能使用bus
的,因此systemd
的部署方式在docker
中会失效。而如果开启特权模式,可能会影响容器于物理机的隔离效果,因此在部署的时候,如果采用容器部署,那么则通过传统的Sys Init V
的方式部署。脚本运行结果如下图所示:
从浏览器打开的结果:
需要注意的的是,如果
docker
运行在wsl2
中并且开启了mirrored
模式网络,docker
的端口转发会出现问题。一个简单的解决方法可以修改/etc/docker/daemon.json
:容器信息: