FROM openjdk:17-alpine
WORKDIR /usr/local/app


# Copy in the source code
COPY target/*.jar /usr/local/app
COPY entrypoint.sh  /usr/local/app
COPY entrypoint.sh  /
RUN  chmod +x /entrypoint.sh && chmod +x /usr/local/app/entrypoint.sh

EXPOSE 9080

# Setup an app user so the container doesn't run as the root user
#RUN useradd app
#USER app

CMD ["sh", "/entrypoint.sh" ]
