2023-10-24 08:11:47 +02:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
# Define the tags for OBS and build script builds:
|
2021-03-16 21:14:21 +01:00
|
|
|
#!BuildTag: %%TAGPREFIX%%/cdi-uploadproxy:%%PKG_VERSION%%
|
|
|
|
#!BuildTag: %%TAGPREFIX%%/cdi-uploadproxy:%%PKG_VERSION%%.%RELEASE%
|
2021-05-04 17:33:21 +02:00
|
|
|
#!BuildTag: %%TAGPREFIX%%/cdi-uploadproxy:%%PKG_VERSION%%-%%PKG_RELEASE%%
|
2021-03-12 10:24:15 +01:00
|
|
|
|
2022-01-14 18:45:59 +01:00
|
|
|
#!ExclusiveArch: x86_64 aarch64
|
|
|
|
|
2021-03-12 15:55:48 +01:00
|
|
|
# cdi-uploadproxy container image
|
2021-03-16 21:14:21 +01:00
|
|
|
# KUBEVIRTFROM defined in prjconf, e.g.
|
|
|
|
# BuildFlags: dockerarg:KUBEVIRTFROM=opensuse/tumbleweed
|
|
|
|
ARG KUBEVIRTFROM
|
|
|
|
FROM $KUBEVIRTFROM
|
2021-03-12 10:24:15 +01:00
|
|
|
|
2022-08-05 06:59:04 +02:00
|
|
|
# Mandatory labels for the build service:
|
|
|
|
# https://en.opensuse.org/Building_derived_containers
|
2021-03-16 21:14:21 +01:00
|
|
|
# labelprefix=%%LABELPREFIX%%
|
2022-08-05 06:59:04 +02:00
|
|
|
LABEL org.opencontainers.image.title="CDI uploadproxy container"
|
|
|
|
LABEL org.opencontainers.image.description="Upload proxy 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-uploadproxy:%%PKG_VERSION%%.%RELEASE%"
|
|
|
|
# endlabelprefix
|
2021-03-12 10:24:15 +01:00
|
|
|
|
2021-04-26 19:14:43 +02:00
|
|
|
RUN zypper -n install \
|
2021-03-12 10:24:15 +01:00
|
|
|
containerized-data-importer-uploadproxy \
|
|
|
|
shadow && \
|
2021-04-26 19:14:43 +02:00
|
|
|
zypper clean -a && \
|
2021-03-16 21:14:21 +01:00
|
|
|
useradd -u 1001 --create-home -s /bin/bash cdi-uploadproxy
|
2021-03-12 10:24:15 +01:00
|
|
|
WORKDIR /home/cdi-uploadproxy
|
|
|
|
USER 1001
|
|
|
|
ENTRYPOINT [ "/usr/bin/virt-cdi-uploadproxy", "-alsologtostderr" ]
|