centos8.2以下的如果部署不成功,先重置服务器,再升级一下内核就可以了
sudo yum update
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
sudo yum makecache fast
sudo yum install docker-ce
sudo systemctl start docker
sudo systemctl enable docker
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://mirror.ccs.tencentyun.com"]
}
EOF
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}
EOF
sudo service docker restart
sudo yum remove docker docker-common docker-selinux docker-engine
sudo docker pull nevinee/jd:v4
docker run -dit \
-v /jd/config:/jd/config \
-v /jd/log:/jd/log \
-v /jd/scripts:/jd/scripts \
-v /jd/own:/jd/own \
-p 5678:5678 \
-e ENABLE_HANGUP=true \
-e ENABLE_WEB_PANEL=true \
-e ENABLE_WEB_TTYD=true \
--name jd \
--hostname jd \
--restart always \
nevinee/jd:v4
要想换库直接改最后一行
docker run -dit \
-v /你想保存的目录/jd1/config:/jd/config `# 配置保存目录,冒号左边请修改为你想存放的路径`\
-v /你想保存的目录/jd1/log:/jd/log `# 日志保存目录,冒号左边请修改为你想存放的路径` \
-v /你想保存的目录/jd1/scripts:/jd/scripts `# 脚本文件目录,映射脚本文件到安装路径` \
-v /jd/own:/jd/own \
-p 5679:5678 \
-e ENABLE_HANGUP=true \
-e ENABLE_WEB_PANEL=true \
-e ENABLE_WEB_TTYD=true \
--name jd1 \
--hostname jd1 \
--restart always \
nevinee/jd:v4
v4更新命令
docker exec -it jd1 bash jup
docker exec -it jd1 bash
wget -q https://ghproxy.com/https://raw.githubusercontent.com/jiulan/jd_v4/main/v4mb.sh -O v4mb.sh && chmod +x v4mb.sh && ./v4mb.sh
cd panel
npm i
pm2 start server.js
-p 宿主机端口: 容器内端口
-p A: A 内外同端口
-p B: A 异端口