update docker

master
yutent 2024-12-20 18:09:02 +08:00
parent cc7a34d790
commit b7926fb7b2
1 changed files with 51 additions and 34 deletions

View File

@ -32,20 +32,26 @@ if [ "$1" == "pack" ]; then
else else
if [ "$deb_arch" == "amd64" ] || [ "$deb_arch" == "arm64" ]; then if [ "$deb_arch" == "amd64" ] || [ "$deb_arch" == "arm64" ]; then
sudo rm -rf docker-buildx-plugin
sudo rm -rf docker-ce-cli
sudo rm -rf docker-ce-rootless-extras
sudo rm -rf docker-ce
sudo rm -rf docker-compose-plugin
# 下载原包 # 下载原包
echo "下载原包..." echo "下载原包..."
wget "${base_url}/${deb_arch}/containerd.io_1.7.24-1_${deb_arch}.deb" -O containerd.io.deb # wget "${base_url}/${deb_arch}/containerd.io_1.7.24-1_${deb_arch}.deb" -O containerd.io.deb
wget "${base_url}/${deb_arch}/docker-buildx-plugin_0.19.2-1~debian.12~bookworm_${deb_arch}.deb" -O docker-buildx-plugin.deb wget "${base_url}/${deb_arch}/docker-buildx-plugin_0.19.3-1~debian.12~bookworm_${deb_arch}.deb" -O docker-buildx-plugin.deb
wget "${base_url}/${deb_arch}/docker-ce-cli_27.4.0-1~debian.12~bookworm_${deb_arch}.deb" -O docker-ce-cli.deb wget "${base_url}/${deb_arch}/docker-ce-cli_27.4.1-1~debian.12~bookworm_${deb_arch}.deb" -O docker-ce-cli.deb
wget "${base_url}/${deb_arch}/docker-ce-rootless-extras_27.4.0-1~debian.12~bookworm_${deb_arch}.deb" -O docker-ce-rootless-extras.deb wget "${base_url}/${deb_arch}/docker-ce-rootless-extras_27.4.1-1~debian.12~bookworm_${deb_arch}.deb" -O docker-ce-rootless-extras.deb
wget "${base_url}/${deb_arch}/docker-ce_27.4.0-1~debian.12~bookworm_${deb_arch}.deb" -O docker-ce.deb wget "${base_url}/${deb_arch}/docker-ce_27.4.1-1~debian.12~bookworm_${deb_arch}.deb" -O docker-ce.deb
wget "${base_url}/${deb_arch}/docker-compose-plugin_2.31.0-1~debian.12~bookworm_${deb_arch}.deb" -O docker-compose-plugin.deb wget "${base_url}/${deb_arch}/docker-compose-plugin_2.32.1-1~debian.12~bookworm_${deb_arch}.deb" -O docker-compose-plugin.deb
if [ "$deb_arch" == "amd64" ]; then if [ "$deb_arch" == "amd64" ]; then
wget "${base_url}/${deb_arch}/docker-scan-plugin_0.23.0~debian-bookworm_${deb_arch}.deb" -O docker-scan-plugin.deb wget "${base_url}/${deb_arch}/docker-scan-plugin_0.23.0~debian-bookworm_${deb_arch}.deb" -O docker-scan-plugin.deb
@ -57,40 +63,51 @@ else
# 解包 # 解包
echo "解包..." echo "解包..."
if [ "$deb_arch" == "amd64" ]; then if [ "$deb_arch" == "amd64" ]; then
apt deb docker-scan-plugin.deb if [ -f "docker-scan-plugin.deb" ]; then
fi apt deb docker-scan-plugin.deb
apt deb docker-buildx-plugin.deb rm -v docker-scan-plugin.deb
apt deb docker-ce-cli.deb
apt deb docker-ce-rootless-extras.deb
apt deb docker-ce.deb
apt deb docker-compose-plugin.deb
echo "完成^_^"
echo ""
# 移除旧包 sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-scan-plugin/DEBIAN/control
echo "移除旧包..." fi
if [ "$deb_arch" == "amd64" ]; then
rm -v docker-scan-plugin.deb
fi fi
rm -v docker-buildx-plugin.deb
rm -v docker-ce-cli.deb
rm -v docker-ce-rootless-extras.deb
rm -v docker-ce.deb
rm -v docker-compose-plugin.deb
echo "完成^_^"
echo ""
echo "修改打包人信息..." if [ -f "docker-buildx-plugin.deb" ]; then
if [ "$deb_arch" == "amd64" ]; then apt deb docker-buildx-plugin.deb
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-scan-plugin/DEBIAN/control rm -v docker-buildx-plugin.deb
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-buildx-plugin/DEBIAN/control
fi fi
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-buildx-plugin/DEBIAN/control
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-ce-cli/DEBIAN/control
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-ce-rootless-extras/DEBIAN/control
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-ce/DEBIAN/control
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-compose-plugin/DEBIAN/control
if [ -f "docker-ce-cli.deb" ]; then
apt deb docker-ce-cli.deb
rm -v docker-ce-cli.deb
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-ce-cli/DEBIAN/control
fi
if [ -f "docker-ce-rootless-extras.deb" ]; then
apt deb docker-ce-rootless-extras.deb
rm -v docker-ce-rootless-extras.deb
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-ce-rootless-extras/DEBIAN/control
fi
if [ -f "docker-ce.deb" ]; then
apt deb docker-ce.deb
rm -v docker-ce.deb
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-ce/DEBIAN/control
fi
if [ -f "docker-compose-plugin.deb" ]; then
apt deb docker-compose-plugin.deb
rm -v docker-compose-plugin.deb
sed -i "s/Docker <support@docker.com>/Yutent <yutent.io@gmail.com>/" docker-compose-plugin/DEBIAN/control
fi
echo "完成^_^" echo "完成^_^"
echo ""
echo "手动调整版本号, 然后执行打包命令" echo "手动调整版本号, 然后执行打包命令"
fi fi