# ContainerFile used to create the image available at quay.io/qm-images/kvm:latest
#
# How to build
# ==================
# podman login quay.io
# use build_kvm_container.sh to build container
# podman push quay.io/qm-images/kvm:latest
FROM fedora-minimal:latest

ENV PASSWORD_FEDORA_USER=fedora

RUN dnf install qemu-system-$(arch) -y \
                 && dnf clean all && rm -rf /var/cache/dnf

COPY ./Fedora-Cloud-Base-Generic.qcow2 /var/lib/libvirt/images/

# Set container stay alive
ENTRYPOINT ["/usr/bin/qemu-system-x86_64","-smp","12","-enable-kvm","-m","2G","-machine","q35","-cpu","host","-device","virtio-net-pci,netdev=n0,mac=FE:30:26:a6:91:2d","-netdev","user,id=n0,net=10.0.2.0/24,hostfwd=tcp::2226-:22","-drive","file=/var/lib/libvirt/images/Fedora-Cloud-Base-Generic.qcow2,index=0,media=disk,format=qcow2,if=virtio,snapshot=off","-nographic"]
