2020-09-29 17:10:12 +02:00
|
|
|
# Define the tags for OBS and build script builds:
|
2021-03-17 14:43:35 +01:00
|
|
|
#!BuildTag: %%TAGPREFIX%%/virt-launcher:%%PKG_VERSION%%
|
|
|
|
#!BuildTag: %%TAGPREFIX%%/virt-launcher:%%PKG_VERSION%%.%RELEASE%
|
2021-05-04 17:34:51 +02:00
|
|
|
#!BuildTag: %%TAGPREFIX%%/virt-launcher:%%PKG_VERSION%%-%%PKG_RELEASE%%
|
2020-09-29 17:10:12 +02:00
|
|
|
|
2022-01-18 14:10:50 +01:00
|
|
|
#!ExclusiveArch: x86_64 aarch64
|
|
|
|
|
2020-09-29 17:10:12 +02:00
|
|
|
# virt-launcher container image
|
2020-11-18 00:04:10 +01:00
|
|
|
# KUBEVIRTFROM defined in prjconf, e.g.
|
|
|
|
# BuildFlags: dockerarg:KUBEVIRTFROM=opensuse/tumbleweed
|
|
|
|
ARG KUBEVIRTFROM
|
|
|
|
FROM $KUBEVIRTFROM
|
2022-01-18 14:10:50 +01:00
|
|
|
# TARGETARCH defined in prjconf, to handle architecture specific bits
|
2022-01-19 08:06:39 +01:00
|
|
|
# since TARGETARCH is not defined in OBS builds yet. Default to amd64.
|
|
|
|
ARG TARGETARCH=amd64
|
2020-09-29 17:10:12 +02:00
|
|
|
|
2021-03-17 14:43:35 +01:00
|
|
|
# labelprefix=%%LABELPREFIX%%
|
2020-09-29 17:10:12 +02:00
|
|
|
PREFIXEDLABEL org.opencontainers.image.title="kubevirt virt-launcher container"
|
|
|
|
PREFIXEDLABEL org.opencontainers.image.description="Container to host VM processes for kubevirt"
|
|
|
|
PREFIXEDLABEL org.opencontainers.image.created="%BUILDTIME%"
|
|
|
|
PREFIXEDLABEL org.opencontainers.image.version="%%PKG_VERSION%%.%RELEASE%"
|
|
|
|
PREFIXEDLABEL org.openbuildservice.disturl="%DISTURL%"
|
2021-06-08 14:39:41 +02:00
|
|
|
PREFIXEDLABEL org.opensuse.reference="%%REGISTRY%%/%%TAGPREFIX%%/virt-launcher:%%PKG_VERSION%%.%RELEASE%"
|
2020-09-29 17:10:12 +02:00
|
|
|
|
2021-04-20 10:11:31 +02:00
|
|
|
RUN zypper -n install \
|
|
|
|
augeas \
|
|
|
|
augeas-lenses \
|
|
|
|
iptables \
|
|
|
|
kubevirt-container-disk \
|
|
|
|
kubevirt-virt-launcher \
|
|
|
|
libcap-progs \
|
|
|
|
libvirt-client \
|
|
|
|
libvirt-daemon-driver-storage-core \
|
|
|
|
libvirt-daemon-qemu \
|
|
|
|
nftables \
|
|
|
|
qemu-tools \
|
|
|
|
socat \
|
2021-11-26 07:00:55 +01:00
|
|
|
tar \
|
2021-09-29 18:13:28 +02:00
|
|
|
timezone \
|
2021-07-13 07:36:18 +02:00
|
|
|
vim \
|
2022-01-18 14:10:50 +01:00
|
|
|
xorriso
|
2022-01-19 08:06:39 +01:00
|
|
|
|
2022-01-18 14:10:50 +01:00
|
|
|
#!ArchExclusiveLine: x86_64
|
|
|
|
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
2022-01-19 08:06:39 +01:00
|
|
|
zypper -n install qemu-x86 ; \
|
|
|
|
fi;
|
2022-01-18 14:10:50 +01:00
|
|
|
|
|
|
|
#!ArchExclusiveLine: aarch64
|
|
|
|
RUN if [ "$TARGETARCH" = "arm64" ]; then \
|
2022-01-19 08:06:39 +01:00
|
|
|
zypper -n install \
|
2022-01-18 14:10:50 +01:00
|
|
|
qemu-arm \
|
|
|
|
qemu-uefi-aarch64 ; \
|
2022-01-19 08:06:39 +01:00
|
|
|
fi;
|
2022-01-18 14:10:50 +01:00
|
|
|
|
|
|
|
RUN zypper clean -a && \
|
2021-04-20 10:11:31 +02:00
|
|
|
mkdir -p /usr/share/kubevirt/virt-launcher
|
2020-09-29 17:10:12 +02:00
|
|
|
|
2022-01-18 14:10:50 +01:00
|
|
|
RUN mkdir -p /usr/share/OVMF
|
|
|
|
|
|
|
|
#!ArchExclusiveLine: x86_64
|
|
|
|
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
2021-05-04 17:34:51 +02:00
|
|
|
ln -s ../qemu/ovmf-x86_64-code.bin /usr/share/OVMF/OVMF_CODE.fd && \
|
|
|
|
ln -s ../qemu/ovmf-x86_64-vars.bin /usr/share/OVMF/OVMF_VARS.fd && \
|
2022-01-12 07:34:56 +01:00
|
|
|
ln -s ../qemu/ovmf-x86_64-code.bin /usr/share/OVMF/OVMF_CODE.cc.fd && \
|
2021-05-04 17:34:51 +02:00
|
|
|
ln -s ../qemu/ovmf-x86_64-smm-ms-code.bin /usr/share/OVMF/OVMF_CODE.secboot.fd && \
|
2022-01-18 14:10:50 +01:00
|
|
|
ln -s ../qemu/ovmf-x86_64-smm-ms-vars.bin /usr/share/OVMF/OVMF_VARS.secboot.fd ; \
|
|
|
|
fi;
|
|
|
|
|
|
|
|
#!ArchExclusiveLine: aarch64
|
|
|
|
RUN if [ "$TARGETARCH" = "arm64" ]; then \
|
|
|
|
ln -s ../qemu/aavmf-aarch64-code.bin /usr/share/OVMF/AAVMF_CODE.fd && \
|
|
|
|
ln -s ../qemu/aavmf-aarch64-vars.bin /usr/share/OVMF/AAVMF_VARS.fd ; \
|
|
|
|
fi;
|
2021-05-04 17:34:51 +02:00
|
|
|
|
2020-09-29 17:10:12 +02:00
|
|
|
COPY augconf /augconf
|
|
|
|
|
|
|
|
RUN augtool -f /augconf
|
|
|
|
RUN cd /var && rm -rf run && ln -s ../run .
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/bin/virt-launcher" ]
|