2023-03-17 13:47:36 -04:00
|
|
|
FROM fedora:37@sha256:ca620b6a713882989f2dfb31dd34705834c95bc23e493687828080f6e5ad1be6 AS release
|
2022-10-05 03:11:30 -04:00
|
|
|
RUN dnf -y update && \
|
|
|
|
dnf -y install dnf-plugins-core \
|
2022-11-04 11:48:52 -04:00
|
|
|
libvirt-daemon-config-network \
|
|
|
|
libvirt-daemon-kvm \
|
|
|
|
qemu-kvm \
|
|
|
|
swtpm \
|
|
|
|
swtpm-tools \
|
|
|
|
libvirt-client && \
|
2023-03-03 09:07:27 -05:00
|
|
|
dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-c487bde4b4 -y && \
|
2023-02-02 08:40:05 -05:00
|
|
|
dnf remove -y python-setuptools && \
|
2022-10-05 03:11:30 -04:00
|
|
|
dnf clean all
|
2023-03-03 09:07:27 -05:00
|
|
|
# TODO(malt3): remove advisory FEDORA-2023-c487bde4b4 upgrade for libtpms to libtpms-0.9.6-1.fc37.x86_64 once it is in stable
|
2022-10-05 03:11:30 -04:00
|
|
|
|
|
|
|
# Prevent cgroup issues on Fedora and configure libvirt
|
|
|
|
RUN echo "cgroup_controllers = []" >> /etc/libvirt/qemu.conf && \
|
|
|
|
echo "listen_tls = 0" >> /etc/libvirt/libvirtd.conf && \
|
|
|
|
echo "listen_tcp = 1" >> /etc/libvirt/libvirtd.conf && \
|
|
|
|
echo "tcp_port = \"16599\"" >> /etc/libvirt/libvirtd.conf && \
|
|
|
|
echo "listen_addr = \"localhost\"" >> /etc/libvirt/libvirtd.conf && \
|
|
|
|
echo "auth_tcp = \"none\"" >> /etc/libvirt/libvirtd.conf
|
|
|
|
|
2022-10-19 07:10:15 -04:00
|
|
|
# Copy nvram templates
|
|
|
|
COPY ./cli/internal/libvirt/nvram/constellation_vars.testing.fd /usr/share/OVMF/constellation_vars.testing.fd
|
2022-11-04 11:48:52 -04:00
|
|
|
COPY ./cli/internal/libvirt/nvram/constellation_vars.production.fd /usr/share/OVMF/constellation_vars.production.fd
|
2022-10-19 07:10:15 -04:00
|
|
|
|
2022-10-05 03:11:30 -04:00
|
|
|
COPY --chmod=755 ./cli/internal/libvirt/start.sh /start.sh
|
|
|
|
|
|
|
|
ENTRYPOINT ["/start.sh"]
|