layer optimi[s|z]ations
This commit is contained in:
parent
3dca55faf9
commit
ac9927528e
1 changed files with 12 additions and 2 deletions
14
Dockerfile
14
Dockerfile
|
@ -27,15 +27,19 @@ RUN wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install initramfs-tools && \
|
apt-get install initramfs-tools && \
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* && \
|
||||||
echo '#!/bin/bash' > /usr/sbin/update-initramfs && \
|
echo '#!/bin/bash' > /usr/sbin/update-initramfs && \
|
||||||
echo 'exit 0' >> /usr/sbin/update-initramfs && \
|
echo 'exit 0' >> /usr/sbin/update-initramfs && \
|
||||||
chmod +x /usr/sbin/update-initramfs
|
chmod +x /usr/sbin/update-initramfs
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install $(apt-cache depends proxmox-ve|awk '{print $2}'|while read x;do apt-cache depends $x 2>/dev/null|grep Depends|awk '{print $2}'|grep ^[[:alnum:]];done|sort|uniq|egrep -v "pve|proxmox|ifenslave|ifupdown2|qemu-server"|xargs) && \
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/*
|
||||||
|
|
||||||
# repacked proxmox-ve & pve-manager
|
# repacked proxmox-ve & pve-manager
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
rm -f /etc/apt/apt.conf.d/docker-clean && \
|
rm -f /etc/apt/apt.conf.d/docker-clean && \
|
||||||
apt-get install proxmox-ve || echo ok && \
|
apt-get install proxmox-ve || echo ok && \
|
||||||
apt-get install proxmox-backup-restore-image || echo ok && \
|
|
||||||
PVE_PKG="pve-manager" && \
|
PVE_PKG="pve-manager" && \
|
||||||
PVE_VER="$(ls /var/cache/apt/archives/${PVE_PKG}_*.deb|awk -F_ '{print $2}')" && \
|
PVE_VER="$(ls /var/cache/apt/archives/${PVE_PKG}_*.deb|awk -F_ '{print $2}')" && \
|
||||||
PVE_DEB1="${PVE_PKG}_${PVE_VER}_amd64.deb" && \
|
PVE_DEB1="${PVE_PKG}_${PVE_VER}_amd64.deb" && \
|
||||||
|
@ -59,9 +63,15 @@ RUN apt-get update && \
|
||||||
dpkg -i /tmp/${PVE_DEB2} && \
|
dpkg -i /tmp/${PVE_DEB2} && \
|
||||||
echo '#!/bin/sh' > /etc/kernel/postrm.d/zz-proxmox-boot && \
|
echo '#!/bin/sh' > /etc/kernel/postrm.d/zz-proxmox-boot && \
|
||||||
echo 'exit 0' >> /etc/kernel/postrm.d/zz-proxmox-boot && \
|
echo 'exit 0' >> /etc/kernel/postrm.d/zz-proxmox-boot && \
|
||||||
apt-get remove ifupdown2 && \
|
apt-mark hold proxmox-ve && \
|
||||||
|
apt-mark hold pve-manager && \
|
||||||
|
rm -f /etc/apt/apt.conf.d/*pve* /etc/kernel/postinst.d/* && \
|
||||||
|
echo '#!/bin/sh' > /var/lib/dpkg/info/ifupdown2.postinst && \
|
||||||
|
echo 'exit 0' >> /var/lib/dpkg/info/ifupdown2.postinst && \
|
||||||
apt-get -f install && \
|
apt-get -f install && \
|
||||||
apt-get autoremove --purge && \
|
apt-get autoremove --purge && \
|
||||||
|
apt-get purge ifupdown2 && \
|
||||||
|
apt-get install proxmox-backup-restore-image && \
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* && \
|
rm -rf /var/lib/apt/lists/* /tmp/* && \
|
||||||
rm -f /etc/apt/sources.list.d/pve-enterprise.list
|
rm -f /etc/apt/sources.list.d/pve-enterprise.list
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue