Debian Docker 安装青龙面板

已失效

Docker

Docker 支持以下的 Debian 版本:
Buster 10
Stretch 9 (stable) / Raspbian Stretch
Docker Engine-Community 在 x86_64(或 amd64 )armhf,和 arm64 体系结构上受支持。
本文用的是Debian 9.4 - x86_64

一、设置仓库

1、更新 apt 包索引。

apt-get update

2、ubuntu/debian 系统安装 Curl(centos 系统安装 Curl 方法:)

apt-get update -y && apt-get install curl -y(yum install curl -y)

3、更新 apt 包索引

apt-get update

4、安装 apt 依赖包,用于通过 HTTPS 来获取仓库。

apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg2 \
    software-properties-common

5、添加 Docker 的官方 GPG 密钥:

curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/debian/gpg |  apt-key add -

6、0EBF CD88 通过搜索指纹的后8个字符,验证您现在是否拥有带有指纹的密钥。

apt-key fingerprint 0EBFCD88

7、使用以下指令设置稳定版仓库:

add-apt-repository \
   "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/debian \
  $(lsb_release -cs) \
  stable"

8、更新 apt 包索引

apt-get update

9、安装最新版本的 Docker Engine-Community 和 containerd,或者转到下一步安装特定版本:

apt-get install docker-ce docker-ce-cli containerd.io

10、测试 Docker 是否安装成功,输入以下指令,打印出以下信息则安装成功:

docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.


To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.


To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash


Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/


For more examples and ideas, visit:
 https://docs.docker.com/get-started/

二、青龙面板安装

1. 拉取镜像/更新镜像

docker pull whyour/qinglong:latest

2. 删除镜像

docker rmi whyour/qinglong:latest

3. 启动容器(普通服务器)

docker run -dit \
   -v $PWD/ql/config:/ql/config \
   -v $PWD/ql/log:/ql/log \
   -v $PWD/ql/db:/ql/db \
   -p 5700:5700 \
   --name qinglong \
   --hostname qinglong \
   --restart always \
   whyour/qinglong:latest

4.登录面板
浏览器打开http://ip:5700或反向代理的域名

【最新】CentOS 7.6,无需安装宝塔

yum update -y
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
wget -q https://yanyu.ltd/https://raw.githubusercontent.com/yanyuwangluo/VIP/main/Scripts/sh/ql.sh -O ql.sh && bash ql.sh

已安装青龙2.11+的用户,一键拉库 没反应就是网络问题

docker exec -it qinglong bash -c "$(curl -fsSL https://yanyu.ltd/https://github.com/yanyuwangluo/VIP/blob/main/Scripts/sh/1customCDN.sh)"

使用说明:
1、重置Cent OS 7.6系统
2、SSH输入代码
3、需要更改青龙端口的按提示操作,不需要的一直按回车

三、添加JD定时任务库

KingRan库 禁用

ql repo https://github.com/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"

Faker库
F2 助力池版 上车机器人 chriszhuli_bot 【Faker提供拉库代理】

ql repo https://git.metauniverse-cn.com/https://github.com/shufflewzc/faker2.git "jd_|jx_|gua_|jddj_|jdCookie" "activity|backUp" "^jd[^_]|USER|function|utils|sendNotify|ZooFaker_Necklace.js|JDJRValidator_|sign_graphics_validate|ql|JDSignValidator|magic|depend" "main"

F3 内部互助版 【Faker提供拉库代理】 建议用F2 助力池版

ql repo https://git.metauniverse-cn.com/https://github.com/shufflewzc/faker3.git "jd_|jx_|gua_|jddj_|jdCookie" "activity|backUp" "^jd[^_]|USER|function|utils|sendNotify|ZooFaker_Necklace.js|JDJRValidator_|sign_graphics_validate|ql|JDSignValidator|magic|depend" "main"

gys619

ql repo https://github.com/gys619/Absinthe.git "jd_|jx_|jddj_|gua_|getJDCookie|wskey" "activity|backUp" "^jd[^_]|USER|utils|ZooFaker_Necklace|JDJRValidator_|sign_graphics_validate|jddj_cookie|function|ql|magic|JDJR|JD" "main"

【注意】不可同时拉Faker2与Faker3仓库,同时拉多个集合库容易黑ip,保留一个即可。号少选2号多选3
PS:ql repo "repourl" "path" "blacklist" "dependence" "branch"
对应意思"库地址""拉哪些""不拉哪些""依赖文件""分支"

完整库,集合可用脚本,账号互助,不添加助力池,适用于青龙面板。

频道:https://t.me/KingRan521
频道:https://t.me/scriptalking && 讨论群组:https://t.me/Soucetalk
#删除旧日志:新建任务ql rmlog 3 定时规则30 7 */2 * *

拉库建议任务定时
*/30 * * * *30 * * * *15 0-23/4 * * *

四、整理 GitHub 上的一些任务库

通过添加任务,并设置定时规则,使其自动拉取、更新羊毛任务。

咱们为了防止漏掉某些羊毛,上方所有的库新建定时任务拉取,里面有重复脚本禁用脚本,重复的内容会被禁用的。

一键安装所有依赖(基于Faker一键脚本安装的青龙)

docker exec -it qinglong bash

curl -fsSL https://git.metauniverse-cn.com/https://raw.githubusercontent.com/shufflewzc/QLDependency/main/Shell/QLOneKeyDependency.sh | sh

Python3依赖安装失败修复(基于Faker一键脚本安装的青龙)

docker exec -it qinglong bash

curl -sS https://bootstrap.pypa.io/get-pip.py | python3

重启Docker:

docker restart qinglong

五、定时规则

这里的定时规则如下:
秒 分 时 天 月 周
各个单位之间分别以空格分割,假设该任务需要每天12:23:45执行一次。那么则应该这么设置:

45 23 12 * * *

拉完之后记得运行,不运行的话要等到你设置好的时间才会自动执行。运行后会自动拉去一些执行活动的脚本。

六、配置文件进行推送通知

## Telegram
## 下方填写自己申请@BotFather的Token,如10xxx4:AAFcqxxxxgER5uw

export TG_BOT_TOKEN="523******:AAFbQ***********************QNdA"

## 下方填写 @getuseridbot 中获取到的纯数字ID

export TG_USER_ID="14********7"

七、抓取CK码(百度一下)

坏境变量添加

名称:JD_COOKIE
值:pt_key=A*****************************************HfgYS-4-FLf0Vx2qsUVSGbwmLr1k; pt_pin=jd_bO*********bhY;

抓CK:用Edge 浏览器的InPrivate窗口打开手机版京东(m.jd.com)登录 , 按 “F12” 打开浏览器开发调试模式,要选中“网络” 。鼠标选中 “log.git” 右键 ->复制->全部复制为Node.jsfetch 。 拷贝到新建文本文件(txt)中 。
爪机端推荐:用alook浏览器,具体操作:登录-工具箱-开发者工具-cookies


有的时候docker出错,或者被你折腾坏了。里面还有很多的镜像和容器在运行,这个时候我们就需要用命令来删除了。

命令模式删除容器

先查看所有运行中的容器,命令如下:

docker ps

单独删除某个容器,那么需要先停止,然后删除

docker stop 容器id
docker rm 容器id

删除全部容器,删除之前需要全部停止:

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

注意:docker ps -a -q 显示所有运行过docker 容器的 docker ID


删除镜像

查看服务器中的所有镜像:

docker images

删除指定id的镜像

docker rmi 

删除所有的images

docker rmi $(docker images -q)

注意:docker images -q 显示所有的镜像id
有关联无法删除时候,需要加参数-f 强制删除

docker rmi -f $(docker images -q)  #强制删除所有
docker rmi -f   #强制删除某个镜像

出现错误,“Error: No such image”如果不是root用户,请先切换到root:

rm -rf /var/lib/docker

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注