-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Douglas Schilling Landgraf <[email protected]> Signed-off-by: Yariv Rachmani <[email protected]>
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |