File Dockerfile of Package cdi-operator-container.25876

# Defines the tag for OBS and build script builds:
#!BuildTag: %%TAGPREFIX%%/cdi-operator:%%PKG_VERSION%%
#!BuildTag: %%TAGPREFIX%%/cdi-operator:%%PKG_VERSION%%.%RELEASE%
#!BuildTag: %%TAGPREFIX%%/cdi-operator:%%PKG_VERSION%%-%%PKG_RELEASE%%

#!ExclusiveArch: x86_64

# cdi-operator container image
# KUBEVIRTFROM defined in prjconf, e.g.
#  BuildFlags: dockerarg:KUBEVIRTFROM=opensuse/tumbleweed
ARG KUBEVIRTFROM
FROM $KUBEVIRTFROM

# labelprefix=%%LABELPREFIX%%
PREFIXEDLABEL org.opencontainers.image.title="CDI operator service container"
PREFIXEDLABEL org.opencontainers.image.description="Operator for the data fetching service for VM container images"
PREFIXEDLABEL org.opencontainers.image.created="%BUILDTIME%"
PREFIXEDLABEL org.opencontainers.image.version="%%PKG_VERSION%%.%RELEASE%"
PREFIXEDLABEL org.openbuildservice.disturl="%DISTURL%"
PREFIXEDLABEL org.opensuse.reference="%%REGISTRY%%/%%TAGPREFIX%%/cdi-operator:%%PKG_VERSION%%.%RELEASE%"

RUN zypper -n install \
           containerized-data-importer-operator \
           shadow && \
    zypper clean -a && \
    useradd -u 1001 --create-home -s /bin/bash cdi-operator
WORKDIR /home/cdi-operator
USER 1001
ENTRYPOINT [ "/usr/bin/virt-cdi-operator" ]
openSUSE Build Service is sponsored by