-FROM icr.io/appcafe/open-liberty:25.0.0.1-full-java17-openj9-ubi

USER root
RUN dnf install -y iputils jq && dnf clean all

COPY HATSProj1_EAR.ear /config/dropins/
COPY HATSProj2.ear /config/dropins/ 

COPY server.xml /opt/ol/wlp/usr/servers/defaultServer

COPY jvm.options /config/

COPY --chown=1001:0 updatepod.sh /
RUN chmod +x /updatepod.sh
COPY --chown=1001:0 wrapper.sh /
RUN chmod +x /wrapper.sh

USER 1001
CMD ["sh", "/wrapper.sh"]