# syntax=docker/dockerfile:1
# Supply approved OS and runtime-carrier digests. The carrier provides both trees.
ARG RUNTIME_PAYLOAD_IMAGE
ARG OS_IMAGE
FROM ${RUNTIME_PAYLOAD_IMAGE} AS payload
FROM ${OS_IMAGE}
# The final OS must supply the shared libraries used by the copied binaries.
COPY --from=payload /payload/java/ /opt/java/
COPY --from=payload /payload/tomcat/ /opt/tomcat/
ENV JAVA_HOME=/opt/java CATALINA_HOME=/opt/tomcat
# Publish the parent by digest. The child supplies the runtime user and launcher.
