Fedora container image with QEMU included
  • Dockerfile 82.7%
  • Makefile 17.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-08 13:43:15 +07:00
.github/workflows ci: precheck on build-experimental 2026-11-08 13:43:15 +07:00
.editorconfig chore: add .editorconfig 2026-11-08 13:31:17 +07:00
.gitattributes chore: remove build.yml from merge strategy 2026-11-03 00:02:56 +07:00
Dockerfile build: use qemu-system-x86-core to reduce size 2026-11-06 02:19:56 +07:00
LICENSE Initial commit 2026-10-23 11:04:03 +07:00
Makefile build: add Makefile for easier build and push 2026-10-25 11:47:15 +07:00
README.md docs: add build schedule info on readme 2026-11-06 21:10:07 +07:00

fedora-qemu-container

Build Status Image Created

Fedora container image with QEMU included

My motivation

I need this kind of image because I need to run vyos router as a podman container.

That's why beside qemu-system-x86 and qemu-kvm, I also add iproute and iputils package on this image.

Container image

You can pull our build image using podman:

podman pull forgejo.kodesumber.com/adhisimon/fedora-qemu:latest

or using docker:

docker pull forgejo.kodesumber.com/adhisimon/fedora-qemu:latest

Latest image can be found on:

https://forgejo.kodesumber.com/adhisimon/-/packages/container/fedora-qemu/latest

Included packages

See Dockerfile.

All packages are come from from fedora repository. No custom packages added.

Example quadlet

Here is the example for quadlet file that I use to create vyos in container:

# /etc/containers/systemd/vyos.container

[Unit]
After=network-online.target

StartLimitIntervalSec=5m
StartLimitBurst=5

[Container]
ContainerName=vyos
Image=forgejo.kodesumber.com/adhisimon/fedora-qemu:latest
Pull=newer
AutoUpdate=registry

SecurityLabelType=unconfined_t
SecurityLabelDisable=true

AddCapability=SYS_ADMIN
AddCapability=NET_ADMIN

AddDevice=/dev/kvm
AddDevice=/dev/net/tun
AddDevice=/dev/vhost-net

Volume=/var/local/data0/containers/qemu/vyos.qcow2:/data/vyos.qcow2:Z

Network=podman
Network=vlan2.network

Exec=/bin/sh -c "hash -r && \
  echo '=== Create bridge ===' && \
  ip link add name br0 type bridge && \
  ip link set dev br0 up && \
  echo '=== Put eth1 to bridge ===' && \
  ip link set dev eth1 master br0 && \
  echo '=== Create TAP interface ===' && \
  ip tuntap add dev tap0 mode tap multi_queue && \
  ip link set dev tap0 up && \
  ip link set dev tap0 master br0 && \
  echo '=== Run QEMU ===' && \
  /usr/bin/qemu-system-x86_64 \
  -enable-kvm \
  -machine q35 \
  -cpu host \
  -smp 2 \
  -m 2048 \
  -drive file=/data/vyos.qcow2,format=qcow2,if=virtio \
  -netdev tap,id=hn0,ifname=tap0,script=no,downscript=no,vhost=on,queues=2 \
  -device virtio-net-pci,netdev=hn0,mac=99:99:99:99:99:99,mq=on,vectors=6 \
  -nographic \
  -serial mon:stdio"

# don't forget to change 99:99:99:99:99:99 above with some random mac address

[Service]
Restart=on-failure
RestartSec=30

[Install]
WantedBy=default.target

Additional info

Forgejo action will build this image regularly (monthly).

You can contact me on fediverse. My main fediverse id is @adhisimon.kodesumber.com.