# SPDX-License-Identifier: MIT
#!BuildTag: suse/manager/5.0/%ARCH%/server-migration-14-16:5.0.7 suse/manager/5.0/%ARCH%/server-migration-14-16:5.0.7.%RELEASE% suse/manager/5.0/%ARCH%/server-migration-14-16:latest

ARG BASE=registry.suse.com/bci/bci-base:15.5
FROM $BASE

# Create stable static UID and GID for postgres, ...
# postgresql UID/GID 999 to be compatible with upstream
RUN groupadd -r --gid 999 postgres
RUN useradd -r -s /usr/bin/bash -g postgres -d /var/lib/pgsql --uid 999 postgres

# Main packages
RUN zypper ref 
RUN zypper --gpg-auto-import-keys --non-interactive install --auto-agree-with-licenses --force-resolution \
    postgresql16-server \
    postgresql16-contrib \
    postgresql14-server \
    postgresql14-contrib

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

# Build Service required labels
# labelprefix=com.suse.manager.server-migration-14-16
LABEL com.suse.supportlevel="l3"
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle/"
LABEL com.suse.release-stage="released"
LABEL com.suse.eula="sle-eula"
LABEL org.opencontainers.image.name=server-migration-14-16-image
LABEL org.opencontainers.image.title="${PRODUCT} server migration container"
LABEL org.opencontainers.image.description="${PRODUCT} server migration 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.0.17
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/%ARCH%/server-migration-14-16:5.0.7.%RELEASE%"
# endlabelprefix
LABEL org.uyuni.version="${PRODUCT_VERSION}"

