From b8ce90e8e1f9ef1afc1782573cfd464f61f81fca Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Tue, 15 Aug 2023 03:02:35 +0000 Subject: [PATCH] Update --- CHANGELOG.md | 4 +++ README.md | 4 +-- dockerfiles/Dockerfile_CN_aarch64 | 33 ++++++++++++++++++++ dockerfiles/Dockerfile_CN_x86_64 | 52 +++++++++++++++++++++++++++++++ dockerfiles/Dockerfile_aarch64 | 33 ++++++++++++++++++++ dockerfiles/Dockerfile_x86_64 | 50 +++++++++++++++++++++++++++++ 6 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 dockerfiles/Dockerfile_CN_aarch64 create mode 100644 dockerfiles/Dockerfile_CN_x86_64 create mode 100644 dockerfiles/Dockerfile_aarch64 create mode 100644 dockerfiles/Dockerfile_x86_64 diff --git a/CHANGELOG.md b/CHANGELOG.md index e236802..68c1afd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更新日志 +2023.08.11 + +- 修复部分上次更新导致的新BUG,测试无误了 + 2023.08.09 - 判断是否有IPV6网络,如果没有则宿主机就不添加对应的V6的DNS diff --git a/README.md b/README.md index e6822ed..e42400f 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ ## 更新 -2023.08.11 +2023.08.15 -- 修复部分上次更新导致的新BUG,测试无误了 +- 尝试增加Docker安装PVE的方法以适配宿主机不是Debian的情况 [更新日志](CHANGELOG.md) diff --git a/dockerfiles/Dockerfile_CN_aarch64 b/dockerfiles/Dockerfile_CN_aarch64 new file mode 100644 index 0000000..f0c0412 --- /dev/null +++ b/dockerfiles/Dockerfile_CN_aarch64 @@ -0,0 +1,33 @@ +FROM debian:11 + +#set mirror +RUN rm /etc/apt/sources.list && \ +echo "deb http://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list && \ +echo "deb http://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \ +echo "deb http://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \ +echo "deb http://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib" >> /etc/apt/sources.list + +#install base pkg +RUN apt-get update && \ +apt-get install wget systemctl nano vim curl gnupg ca-certificates -y + +#add proxmox repo +#use jiangcuo_proxmox_arm64 https://github.com/jiangcuo/Proxmox-Arm64 +RUN echo "deb https://mirrors.apqa.cn/proxmox/ pvearm main">/etc/apt/sources.list.d/foxi.list && \ +curl -L https://mirrors.apqa.cn/proxmox/gpg.key |apt-key add - + + +#intall proxmox-ve without recommends. +RUN apt-get update && \ +DEBIAN_FRONTEND=noninteractiv apt-get -y --no-install-recommends install proxmox-ve || echo ok + + +#set passwd for root +RUN echo "root:root"|chpasswd + +#clean +RUN rm -rf /var/lib/apt/lists/* /*.deb + +#use setup.sh to start proxmox service +STOPSIGNAL SIGINT +CMD [ "/lib/systemd/systemd", "log-level=info", "unit=sysinit.target"] diff --git a/dockerfiles/Dockerfile_CN_x86_64 b/dockerfiles/Dockerfile_CN_x86_64 new file mode 100644 index 0000000..707d17d --- /dev/null +++ b/dockerfiles/Dockerfile_CN_x86_64 @@ -0,0 +1,52 @@ +FROM debian:11 + +#set mirror +RUN rm /etc/apt/sources.list && \ +echo "deb http://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list && \ +echo "deb http://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \ +echo "deb http://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \ +echo "deb http://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib" >> /etc/apt/sources.list + +#install base pkg +RUN apt-get update && \ +apt-get install wget systemctl nano vim curl gnupg ca-certificates -y + +#add proxmox repo +RUN echo "deb http://mirrors.ustc.edu.cn/proxmox/debian/ bullseye pve-no-subscription" >>/etc/apt/sources.list && \ +curl https://mirrors.ustc.edu.cn/proxmox/debian/proxmox-release-bullseye.gpg|apt-key add - + + +#repacked proxmox-ve +RUN wget https://mirrors.ustc.edu.cn/proxmox/debian/dists/bullseye/pve-no-subscription/binary-amd64/proxmox-ve_7.2-1_all.deb && \ +mkdir /tmp/pve && \ +dpkg -X proxmox-ve_7.2-1_all.deb /tmp/pve/ && \ +dpkg -e proxmox-ve_7.2-1_all.deb /tmp/pve/DEBIAN && \ +sed -i "s/pve-kernel-helper,//g" /tmp/pve/DEBIAN/control && \ +sed -i "s/pve-kernel-5.15,//g" /tmp/pve/DEBIAN/control && \ +dpkg-deb -Zxz -b /tmp/pve/ /tmp/ + + +#repacked pve-manager +RUN wget https://mirrors.ustc.edu.cn/proxmox/debian/dists/bullseye/pve-no-subscription/binary-amd64/pve-manager_7.2-7_amd64.deb && \ +mkdir /tmp/pve-manager && \ +dpkg -X pve-manager_7.2-7_amd64.deb /tmp/pve-manager/ && \ +dpkg -e pve-manager_7.2-7_amd64.deb /tmp/pve-manager/DEBIAN && \ +sed -i "s/ifupdown2 (>= 2.0.1-1+pve8) | ifenslave (>= 2.6),//g" /tmp/pve-manager/DEBIAN/control && \ +dpkg-deb -Zxz -b /tmp/pve-manager/ /tmp + +#intall proxmox-ve without recommends. ifupdown2 will install failed but ok +RUN apt-get update && \ +DEBIAN_FRONTEND=noninteractiv apt-get -y --no-install-recommends install proxmox-ve || echo ok + +##install again +RUN dpkg -i /tmp/*.deb || echo ok + +#set passwd for root +RUN echo "root:root"|chpasswd + +#clean +RUN rm -rf /var/lib/apt/lists/* /*.deb + +#use setup.sh to start proxmox service +STOPSIGNAL SIGINT +CMD [ "/lib/systemd/systemd", "log-level=info", "unit=sysinit.target"] \ No newline at end of file diff --git a/dockerfiles/Dockerfile_aarch64 b/dockerfiles/Dockerfile_aarch64 new file mode 100644 index 0000000..89f1bc0 --- /dev/null +++ b/dockerfiles/Dockerfile_aarch64 @@ -0,0 +1,33 @@ +FROM debian:11 + +# Set official Debian sources +RUN rm /etc/apt/sources.list && \ + echo "deb http://deb.debian.org/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb http://deb.debian.org/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb http://security.debian.org/debian-security bullseye-security main contrib" >> /etc/apt/sources.list + +# Install base packages +RUN apt-get update && \ + apt-get install wget systemd nano vim curl gnupg ca-certificates -y + +#add proxmox repo +#use jiangcuo_proxmox_arm64 https://github.com/jiangcuo/Proxmox-Arm64 +RUN echo "deb https://global.mirrors.apqa.cn/proxmox/ pvearm main">/etc/apt/sources.list.d/foxi.list && \ +curl -L https://global.mirrors.apqa.cn/proxmox/gpg.key |apt-key add - + + +#intall proxmox-ve without recommends. +RUN apt-get update && \ +DEBIAN_FRONTEND=noninteractiv apt-get -y --no-install-recommends install proxmox-ve || echo ok + + +#set passwd for root +RUN echo "root:root"|chpasswd + +#clean +RUN rm -rf /var/lib/apt/lists/* /*.deb + +#use setup.sh to start proxmox service +STOPSIGNAL SIGINT +CMD [ "/lib/systemd/systemd", "log-level=info", "unit=sysinit.target"] diff --git a/dockerfiles/Dockerfile_x86_64 b/dockerfiles/Dockerfile_x86_64 new file mode 100644 index 0000000..0e60402 --- /dev/null +++ b/dockerfiles/Dockerfile_x86_64 @@ -0,0 +1,50 @@ +FROM debian:11 + +# Set official Debian sources +RUN rm /etc/apt/sources.list && \ + echo "deb http://deb.debian.org/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb http://deb.debian.org/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb http://security.debian.org/debian-security bullseye-security main contrib" >> /etc/apt/sources.list + +# Install base packages +RUN apt-get update && \ + apt-get install wget systemd nano vim curl gnupg ca-certificates -y + +# Add Proxmox repo +RUN echo "deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription" >> /etc/apt/sources.list && \ + curl https://download.proxmox.com/debian/proxmox-release-bullseye.gpg | apt-key add - + +# Repack Proxmox-VE package +RUN wget https://download.proxmox.com/debian/dists/bullseye/pve-no-subscription/binary-amd64/proxmox-ve_7.2-1_all.deb && \ + mkdir /tmp/pve && \ + dpkg -X proxmox-ve_7.2-1_all.deb /tmp/pve/ && \ + dpkg -e proxmox-ve_7.2-1_all.deb /tmp/pve/DEBIAN && \ + sed -i "s/pve-kernel-helper,//g" /tmp/pve/DEBIAN/control && \ + sed -i "s/pve-kernel-5.15,//g" /tmp/pve/DEBIAN/control && \ + dpkg-deb -Zxz -b /tmp/pve/ /tmp/ + +# Repack pve-manager package +RUN wget https://download.proxmox.com/debian/dists/bullseye/pve-no-subscription/binary-amd64/pve-manager_7.2-7_amd64.deb && \ + mkdir /tmp/pve-manager && \ + dpkg -X pve-manager_7.2-7_amd64.deb /tmp/pve-manager/ && \ + dpkg -e pve-manager_7.2-7_amd64.deb /tmp/pve-manager/DEBIAN && \ + sed -i "s/ifupdown2 (>= 2.0.1-1+pve8) | ifenslave (>= 2.6),//g" /tmp/pve-manager/DEBIAN/control && \ + dpkg-deb -Zxz -b /tmp/pve-manager/ /tmp + +# Install Proxmox-VE without recommends. ifupdown2 will fail to install but that's okay. +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install proxmox-ve || echo ok + +# Install again +RUN dpkg -i /tmp/*.deb || echo ok + +# Set password for root +RUN echo "root:root" | chpasswd + +# Clean +RUN rm -rf /var/lib/apt/lists/* /*.deb + +# Use setup.sh to start Proxmox service +STOPSIGNAL SIGINT +CMD ["/lib/systemd/systemd", "log-level=info", "unit=sysinit.target"]