FROM openjdk:17

#인수 설정
ARG JAR_FILE=build/libs/CaliverseAdminAPI.jar

#환경 변수
#ENV ENVIRONMENT=${ENVIRONMENT}
#
#RUN if [ "$ENVIRONMENT" = "stage" ] ; then \
#        JAR_FILE=build/libs/CaliverseAdminAPI-stage.jar ; \
#    elif [ "$ENVIRONMENT" = "live" ] ; then \
#        JAR_FILE=build/libs/CaliverseAdminAPI-live.jar ; \
#    else \
#        JAR_FILE=build/libs/CaliverseAdminAPI.jar ; \
#    fi

COPY ${JAR_FILE} admintool.jar
#메모리 최소 2기가 최대 4기가
ENV JAVA_OPTS="-Xms2g -Xmx4g"
ENTRYPOINT ["java","-jar","/admintool.jar"]