☀️ 尝试支持 Docker 构建

This commit is contained in:
xtaodada 2020-08-11 00:22:41 +08:00
parent 94c16fbaa6
commit 7b6926bb38
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
2 changed files with 3 additions and 2 deletions

View File

@ -38,5 +38,7 @@ RUN git clone -b master https://github.com/xtaodada/PagerMaid-Modify.git /pagerm
WORKDIR /pagermaid/workdir
RUN python3 -m virtualenv venv
RUN source venv/bin/activate; pip3 install -r requirements.txt
USER root
RUN cd /pagermaid/workdir
CMD ["sh","utils/docker-run.sh"]

View File

@ -82,13 +82,13 @@ login() {
systemctl_reload(){
echo "正在写入系统进程守护 . . ."
sudo -i>> /dev/null 2>&1
echo "[Unit]
Description=PagerMaid-Modify telegram utility daemon
After=network.target
[Install]
WantedBy=multi-user.target
[Service]
User=pagermaid
Type=simple
WorkingDirectory=/pagermaid/workdir
ExecStart=/pagermaid/workdir/venv/bin/python -m pagermaid
@ -97,7 +97,6 @@ systemctl_reload(){
chmod 755 pagermaid.service >> /dev/null 2>&1
systemctl daemon-reload >> /dev/null 2>&1
systemctl enable pagermaid >> /dev/null 2>&1
su pagermaid >> /dev/null 2>&1
echo ""
echo "请在脚本退出后输入 exit 退出 Docker"
echo ""