2023-08-15 11:02:35 +08:00
|
|
|
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 && \
|
2023-08-15 11:57:52 +08:00
|
|
|
wget --no-check-certificate https://download.proxmox.com/debian/dists/bullseye/pve-no-subscription/binary-amd64/proxmox-ve_7.2-1_all.deb -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg && \
|
2023-08-15 11:54:36 +08:00
|
|
|
chmod +r /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
|
2023-08-15 11:02:35 +08:00
|
|
|
|
|
|
|
# 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"]
|