2023-10-24 08:11:54 +02:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
# Define the tags for OBS and build script builds:
|
2021-03-16 21:17:42 +01:00
|
|
|
#!BuildTag: %%TAGPREFIX%%/cdi-uploadserver:%%PKG_VERSION%%
|
|
|
|
#!BuildTag: %%TAGPREFIX%%/cdi-uploadserver:%%PKG_VERSION%%.%RELEASE%
|
2021-05-04 17:33:27 +02:00
|
|
|
#!BuildTag: %%TAGPREFIX%%/cdi-uploadserver:%%PKG_VERSION%%-%%PKG_RELEASE%%
|
2021-03-12 10:25:22 +01:00
|
|
|
|
2022-01-14 18:45:47 +01:00
|
|
|
#!ExclusiveArch: x86_64 aarch64
|
|
|
|
|
2021-03-12 15:54:58 +01:00
|
|
|
# cdi-uploadserver container image
|
2021-03-16 21:17:42 +01:00
|
|
|
# KUBEVIRTFROM defined in prjconf, e.g.
|
|
|
|
# BuildFlags: dockerarg:KUBEVIRTFROM=opensuse/tumbleweed
|
|
|
|
ARG KUBEVIRTFROM
|
|
|
|
FROM $KUBEVIRTFROM
|
2021-03-12 10:25:22 +01:00
|
|
|
|
2022-08-05 06:59:12 +02:00
|
|
|
# Mandatory labels for the build service:
|
|
|
|
# https://en.opensuse.org/Building_derived_containers
|
2021-03-16 21:17:42 +01:00
|
|
|
# labelprefix=%%LABELPREFIX%%
|
2022-08-05 06:59:12 +02:00
|
|
|
LABEL org.opencontainers.image.title="CDI upload server container"
|
|
|
|
LABEL org.opencontainers.image.description="Upload server for the data fetching service for VM container images"
|
|
|
|
LABEL org.opencontainers.image.created="%BUILDTIME%"
|
|
|
|
LABEL org.opencontainers.image.version="%%PKG_VERSION%%.%RELEASE%"
|
|
|
|
LABEL org.openbuildservice.disturl="%DISTURL%"
|
|
|
|
LABEL org.opensuse.reference="%%REGISTRY%%/%%TAGPREFIX%%/cdi-uploadserver:%%PKG_VERSION%%.%RELEASE%"
|
|
|
|
# endlabelprefix
|
2021-03-12 10:25:22 +01:00
|
|
|
|
2021-04-26 19:14:34 +02:00
|
|
|
RUN zypper -n install \
|
2022-10-13 18:56:03 +02:00
|
|
|
containerized-data-importer-uploadserver \
|
|
|
|
curl \
|
|
|
|
libnbd \
|
2023-07-03 08:28:32 +02:00
|
|
|
qemu-img \
|
2022-10-13 18:56:03 +02:00
|
|
|
shadow \
|
|
|
|
tar \
|
|
|
|
util-linux && \
|
|
|
|
zypper clean -a && \
|
|
|
|
useradd -u 1001 --create-home -s /bin/bash cdi-uploadserver
|
2021-03-12 10:25:22 +01:00
|
|
|
|
2022-10-13 18:56:03 +02:00
|
|
|
WORKDIR /home/cdi-uploadserver
|
|
|
|
USER 1001
|
2021-03-12 10:25:22 +01:00
|
|
|
ENTRYPOINT [ "/usr/bin/virt-cdi-uploadserver", "-alsologtostderr" ]
|