-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2a0a82
commit eea44a5
Showing
20 changed files
with
1,063 additions
and
1,081 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
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 | ||
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 && \ | ||
RUN apt-get update && | ||
apt-get install wget systemd 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 && \ | ||
wget --no-check-certificate https://mirrors.ustc.edu.cn/proxmox/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg && \ | ||
RUN echo "deb http://mirrors.ustc.edu.cn/proxmox/debian/ bullseye pve-no-subscription" >>/etc/apt/sources.list && | ||
wget --no-check-certificate https://mirrors.ustc.edu.cn/proxmox/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg && | ||
chmod +r /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg | ||
|
||
#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/ | ||
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 | ||
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 | ||
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 | ||
RUN echo "root:root" | chpasswd | ||
|
||
#clean | ||
RUN rm -rf /var/lib/apt/lists/* /*.deb | ||
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"] | ||
CMD [ "/lib/systemd/systemd", "log-level=info", "unit=sysinit.target"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.