From f591d5b2d4e44503c1adc332322d9a8b16301d15 Mon Sep 17 00:00:00 2001 From: Akira Date: Sat, 16 Jan 2021 22:30:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9docker=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/default_task.sh | 2 +- docker/example/custom-append.yml | 9 ++++++++- docker/example/custom-overwrite.yml | 9 ++++++++- docker/example/default.yml | 9 ++++++++- docker/example/docker多账户使用独立容器使用说明.md | 8 ++++---- docker/example/jd_scripts.custom-append.syno.json | 2 +- docker/example/jd_scripts.custom-overwrite.syno.json | 2 +- docker/example/jd_scripts.syno.json | 2 +- docker/example/multi.yml | 8 ++++---- 9 files changed, 36 insertions(+), 15 deletions(-) diff --git a/docker/default_task.sh b/docker/default_task.sh index 167c9760..7bd69cff 100644 --- a/docker/default_task.sh +++ b/docker/default_task.sh @@ -89,4 +89,4 @@ echo "第9步加载最新的定时任务文件..." crontab $mergedListFile echo "第10步将仓库的docker_entrypoint.sh脚本更新至系统/usr/local/bin/docker_entrypoint.sh内..." -cat /scripts/docker_entrypoint.sh >/usr/local/bin/docker_entrypoint.sh +cat /scripts/docker/docker_entrypoint.sh >/usr/local/bin/docker_entrypoint.sh diff --git a/docker/example/custom-append.yml b/docker/example/custom-append.yml index b685384d..fc3beea9 100644 --- a/docker/example/custom-append.yml +++ b/docker/example/custom-append.yml @@ -1,5 +1,5 @@ jd_scripts: - image: akyakya/jd_scripts + image: lxk0301/jd_scripts # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) # 经过实际测试,建议不低于200M # deploy: @@ -13,7 +13,14 @@ jd_scripts: - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh - ./logs:/scripts/logs tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=https://gitee.com/lxk0301/jd_scripts.git # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 #jd cookies # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX diff --git a/docker/example/custom-overwrite.yml b/docker/example/custom-overwrite.yml index 9e920f7e..302528b7 100644 --- a/docker/example/custom-overwrite.yml +++ b/docker/example/custom-overwrite.yml @@ -1,5 +1,5 @@ jd_scripts: - image: akyakya/jd_scripts + image: lxk0301/jd_scripts # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) # 经过实际测试,建议不低于200M # deploy: @@ -13,7 +13,14 @@ jd_scripts: - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh - ./logs:/scripts/logs tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=https://gitee.com/lxk0301/jd_scripts.git # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 #jd cookies # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX diff --git a/docker/example/default.yml b/docker/example/default.yml index e9716b16..d4c31b62 100644 --- a/docker/example/default.yml +++ b/docker/example/default.yml @@ -1,5 +1,5 @@ jd_scripts: - image: akyakya/jd_scripts + image: lxk0301/jd_scripts # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) # 经过实际测试,建议不低于200M # deploy: @@ -12,7 +12,14 @@ jd_scripts: volumes: - ./logs:/scripts/logs tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=https://gitee.com/lxk0301/jd_scripts.git # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 #jd cookies # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX diff --git a/docker/example/docker多账户使用独立容器使用说明.md b/docker/example/docker多账户使用独立容器使用说明.md index 87c40e4a..4fd879d3 100644 --- a/docker/example/docker多账户使用独立容器使用说明.md +++ b/docker/example/docker多账户使用独立容器使用说明.md @@ -10,7 +10,7 @@ version: "3" services: jd_scripts1: #默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2(单核的20%) # 经过实际测试,建议不低于200M # deploy: @@ -32,7 +32,7 @@ services: # - PLANT_BEAN_SHARECODES= jd_scripts2: #默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts2 tty: true @@ -43,7 +43,7 @@ services: - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ - TG_USER_ID=12xxxx206 jd_scripts4: #自定义追加默认之后 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts4 tty: true @@ -56,7 +56,7 @@ services: - TG_USER_ID=12xxxx206 - CUSTOM_LIST_FILE=my_crontab_list.sh jd_scripts5: #自定义覆盖默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts5 tty: true diff --git a/docker/example/jd_scripts.custom-append.syno.json b/docker/example/jd_scripts.custom-append.syno.json index e6fdce53..a2da16f2 100644 --- a/docker/example/jd_scripts.custom-append.syno.json +++ b/docker/example/jd_scripts.custom-append.syno.json @@ -31,7 +31,7 @@ ], "exporting" : false, "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", - "image" : "akyakya/jd_scripts", + "image" : "lxk0301/jd_scripts", "is_ddsm" : false, "is_package" : false, "links" : [], diff --git a/docker/example/jd_scripts.custom-overwrite.syno.json b/docker/example/jd_scripts.custom-overwrite.syno.json index d75581f8..e4e05fb3 100644 --- a/docker/example/jd_scripts.custom-overwrite.syno.json +++ b/docker/example/jd_scripts.custom-overwrite.syno.json @@ -35,7 +35,7 @@ ], "exporting" : false, "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", - "image" : "akyakya/jd_scripts", + "image" : "lxk0301/jd_scripts", "is_ddsm" : false, "is_package" : false, "links" : [], diff --git a/docker/example/jd_scripts.syno.json b/docker/example/jd_scripts.syno.json index 61acfd6e..189b047c 100644 --- a/docker/example/jd_scripts.syno.json +++ b/docker/example/jd_scripts.syno.json @@ -51,7 +51,7 @@ ], "exporting" : false, "id" : "18af38bc0ac37a40e4b9608a86fef56c464577cc160bbdddec90155284fcf4e5", - "image" : "akyakya/jd_scripts", + "image" : "lxk0301/jd_scripts", "is_ddsm" : false, "is_package" : false, "links" : [], diff --git a/docker/example/multi.yml b/docker/example/multi.yml index 64606cbc..a02de0d0 100644 --- a/docker/example/multi.yml +++ b/docker/example/multi.yml @@ -1,7 +1,7 @@ version: "3" services: jd_scripts1: #默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2(单核的20%) # 经过实际测试,建议不低于200M # deploy: @@ -23,7 +23,7 @@ services: # - PLANT_BEAN_SHARECODES= jd_scripts2: #默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts2 tty: true @@ -34,7 +34,7 @@ services: - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ - TG_USER_ID=12xxxx206 jd_scripts4: #自定义追加默认之后 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts4 tty: true @@ -47,7 +47,7 @@ services: - TG_USER_ID=12xxxx206 - CUSTOM_LIST_FILE=my_crontab_list.sh jd_scripts5: #自定义覆盖默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts5 tty: true