Merge pull request #112 from PeterDaveHello/SimplifyDockerfile

Reduce Dockerfile instructions and Docker image layers
This commit is contained in:
sickcodes 2020-12-17 06:22:20 +00:00 committed by GitHub
commit eaa695bc15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,6 @@ ARG VERSION=10.15.6
# This fails on hub.docker.com, useful for debugging in cloud # This fails on hub.docker.com, useful for debugging in cloud
# RUN [[ $(egrep -c '(svm|vmx)' /proc/cpuinfo) -gt 0 ]] || { echo KVM not possible on this host && exit 1; } # RUN [[ $(egrep -c '(svm|vmx)' /proc/cpuinfo) -gt 0 ]] || { echo KVM not possible on this host && exit 1; }
WORKDIR /root
RUN tee -a /etc/pacman.conf <<< '[community-testing]' \ RUN tee -a /etc/pacman.conf <<< '[community-testing]' \
&& tee -a /etc/pacman.conf <<< 'Include = /etc/pacman.d/mirrorlist' && tee -a /etc/pacman.conf <<< 'Include = /etc/pacman.d/mirrorlist'
@ -96,8 +95,7 @@ RUN tee -a sshd_config <<< 'AllowTcpForwarding yes' \
USER arch USER arch
# download OSX-KVM # download OSX-KVM
WORKDIR /home/arch RUN git clone --depth 1 https://github.com/kholia/OSX-KVM.git /home/arch/OSX-KVM
RUN git clone --depth 1 https://github.com/kholia/OSX-KVM.git
# enable ssh # enable ssh
# docker exec .... ./enable-ssh.sh # docker exec .... ./enable-ssh.sh
@ -124,9 +122,7 @@ RUN sudo pacman -Syu qemu libvirt dnsmasq virt-manager bridge-utils flex bison e
# RUN sudo systemctl enable libvirtd.service # RUN sudo systemctl enable libvirtd.service
# RUN sudo systemctl enable virtlogd.service # RUN sudo systemctl enable virtlogd.service
WORKDIR /home/arch/OSX-KVM RUN git clone --depth 1 https://github.com/corpnewt/gibMacOS.git /home/arch/OSX-KVM/gibMacOS
RUN git clone --depth 1 https://github.com/corpnewt/gibMacOS.git
WORKDIR /home/arch/OSX-KVM/gibMacOS WORKDIR /home/arch/OSX-KVM/gibMacOS
@ -183,8 +179,6 @@ USER arch
VOLUME ["/tmp/.X11-unix"] VOLUME ["/tmp/.X11-unix"]
WORKDIR /home/arch/OSX-KVM
CMD ./enable-ssh.sh && envsubst < ./Launch.sh | bash CMD ./enable-ssh.sh && envsubst < ./Launch.sh | bash
# virt-manager mode: eta son # virt-manager mode: eta son