FROM icr.io/appcafe/open-liberty:kernel-slim-java11-openj9-ubi

ARG VERSION=1.0
ARG REVISION=SNAPSHOT

LABEL \
    org.opencontainers.image.authors="Arkhadius" \
    org.opencontainers.image.vendor="Hanoman" \
    org.opencontainers.image.url="local" \
    org.opencontainers.image.source="https://code.senomas.com/arkha/btnmw-was" \
    org.opencontainers.image.version="$VERSION" \
    org.opencontainers.image.revision="$REVISION" \
    vendor="Hanoman" \
    name="mwui" \
    version="$VERSION-$REVISION" \
    summary="The MWUI microservice from the Containerizing microservices MWUI" \
    description="This image contains the MWUI microservice running with the Open Liberty runtime."

COPY --chown=1001:0 \
    target/liberty/wlp/usr/servers/defaultServer/server.xml \
    /config/

RUN features.sh

COPY --chown=1001:0 \
    target/MWUI-1.0.war \
    /config/apps

RUN configure.sh