ci(workflows): 更新docker.yml中的apt-get命令参数
Some checks failed
Build docker and publish / build (20.15.1) (push) Failing after 27s
Some checks failed
Build docker and publish / build (20.15.1) (push) Failing after 27s
移除--allow-insecure-repositories选项以增强安全性
This commit is contained in:
parent
bc2856a23e
commit
184f9103a4
@ -92,8 +92,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
echo "仍在等待锁释放..."; sleep 5
|
echo "仍在等待锁释放..."; sleep 5
|
||||||
done
|
done
|
||||||
apt-get update -y -o Dpkg::Lock::Timeout=600 --allow-unauthenticated --allow-insecure-repositories --allow-downgrades
|
apt-get update -y -o Dpkg::Lock::Timeout=600 --allow-unauthenticated --allow-downgrades
|
||||||
apt-get install -y -o Dpkg::Lock::Timeout=600 --allow-unauthenticated --allow-insecure-repositories --allow-downgrades --force-yes jq curl ca-certificates docker.io
|
apt-get install -y -o Dpkg::Lock::Timeout=600 --allow-unauthenticated --allow-downgrades --force-yes jq curl ca-certificates docker.io
|
||||||
docker --version
|
docker --version
|
||||||
jq --version
|
jq --version
|
||||||
curl --version
|
curl --version
|
||||||
|
|||||||
23
push.sh
Normal file
23
push.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# build-and-push.sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# cd /Users/Apple/code2025/server
|
||||||
|
cd /Users/Apple/vpn/ppanel-server
|
||||||
|
# 固定版本号为latest
|
||||||
|
VERSION=latest
|
||||||
|
|
||||||
|
# 构建镜像
|
||||||
|
echo "Building image with version: $VERSION"
|
||||||
|
docker build -f Dockerfile --platform linux/amd64 --build-arg TARGETARCH=amd64 -t registry.kxsw.us/ppanel/ppanel-server:$VERSION .
|
||||||
|
docker tag registry.kxsw.us/ppanel/ppanel-server:$VERSION registry.kxsw.us/ppanel/ppanel-server:latest
|
||||||
|
|
||||||
|
# 推送镜像
|
||||||
|
echo "Pushing image to registry.kxsw.us"
|
||||||
|
docker push registry.kxsw.us/ppanel/ppanel-server:$VERSION
|
||||||
|
docker push registry.kxsw.us/ppanel/ppanel-server:latest
|
||||||
|
|
||||||
|
|
||||||
|
echo "Build and push completed successfully!"
|
||||||
|
# docker-compose exec certbot certbot certonly --webroot --webroot-path=/etc/letsencrypt -d api-dev.kxsw.us
|
||||||
Loading…
x
Reference in New Issue
Block a user