# SPDX-License-Identifier: MIT
#!BuildTag: multi-linux-manager/5.1/%ARCH%/server-postgresql:5.1.0-beta1 multi-linux-manager/5.1/%ARCH%/server-postgresql:5.1.0-beta1.%RELEASE% multi-linux-manager/5.1/%ARCH%/server-postgresql:latest

ARG PG_BASE=registry.opensuse.org/opensuse/postgres:16
# or ARG BASE=registry.suse.com/suse/postgres:16
FROM $PG_BASE

ADD --chown=root:root root.tar.gz /

# LABELs
ARG PRODUCT="SUSE Multi-Linux Manager"
ARG VENDOR="SUSE LLC"
ARG URL="https://www.uyuni-project.org/"
ARG REFERENCE_PREFIX="registry.opensuse.org/uyuni"
ARG PRODUCT_VERSION="5.1.0-beta1"

# Build Service required labels
# labelprefix=com.suse.multilinuxmanager.server-postgresql
LABEL com.suse.supportlevel="l3"
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle/"
LABEL com.suse.release-stage="beta"
LABEL com.suse.eula="sle-eula"
LABEL org.opencontainers.image.name=server-postgresql-image
LABEL org.opencontainers.image.title="${PRODUCT} PostgreSQL container image"
LABEL org.opencontainers.image.description="${PRODUCT} PostgreSQL container image"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.vendor="${VENDOR}"
LABEL org.opencontainers.image.url="${URL}"
LABEL org.opencontainers.image.version=5.1.1
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/%ARCH%/server-postgresql:5.1.0-beta1.%RELEASE%"
# endlabelprefix
LABEL org.uyuni.version="${PRODUCT_VERSION}"

ENTRYPOINT ["/usr/local/bin/uyuni-entrypoint.sh"]
CMD ["postgres"]
