Skip to content

Commit

Permalink
[WIP]: use quay.io qm - kvm
Browse files Browse the repository at this point in the history
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
Signed-off-by: Yariv Rachmani <[email protected]>
  • Loading branch information
dougsland committed Nov 14, 2024
1 parent e2ad952 commit 9e7d49e
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions subsystems/kvm/ContainerFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ContainerFile used to create the image available at quay.io/qm-images/kvm:latest
#
# How to build
# ==================
# podman login quay.io
# podman build -t quay.io/qm-images/kvm:latest -f ContainerFile
# podman push quay.io/qm-images/kvm:latest
FROM fedora:latest

ENV PASSWORD_FEDORA_USER=fedora

RUN dnf -y install virt-install \
libvirt-daemon \
libvirt-daemon-qemu \
libvirt-daemon-kvm \
libvirt-daemon-config-network \
guestfs-tools \
wget \
vim -y \
&& dnf clean all && rm -rf /var/cache/dnf

RUN wget -O /var/lib/libvirt/images/Fedora-Cloud-Base-Generic.qcow2 https://cofractal-ewr.mm.fcix.net/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2

# Set fedora user pass as fedora
RUN export LIBGUESTFS_BACKEND=direct && \
virt-customize -a /var/lib/libvirt/images/Fedora-Cloud-Base-Generic.qcow2 --password fedora:password:$PASSWORD_FEDORA_USER

# Permission to qemu user/group
RUN chown qemu:qemu /var/lib/libvirt/images/Fedora-Cloud-Base-Generic.qcow2

# Set systemd as the init system for the container
ENTRYPOINT ["/usr/sbin/init"]

0 comments on commit 9e7d49e

Please sign in to comment.