You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.7 KiB
Docker

FROM gradle:7-jdk8 AS build
WORKDIR /application
COPY --chown=gradle:gradle ./ ./
#COPY ./ ./
#RUN chmod +x ./gradlew
RUN gradle clean bootWar
FROM openjdk:8-jre-slim
WORKDIR /app
COPY --from=build /application/build/libs/*.war ./ROOT.war
EXPOSE 8090
#ENTRYPOINT ["java", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-Dspring.profiles.active=dev","-jar"," /app/ROOT.war"]
ENTRYPOINT ["java", "-jar", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-Dspring.profiles.active=dev", "/app/ROOT.war"]
#ENTRYPOINT ["java", "-Dspring.profiles.active=dev", "-jar", "/application/build/libs/core-0.0.1-SNAPSHOT.war"]
#FROM openjdk:8-jdk-alpine as builder
#WORKDIR application
#COPY ./ ./
#RUN chmod +x ./gradlew
##--args='--spring.profiles.active=dev'
#RUN ./gradlew clean bootWar
##CMD["./gradlew", "-Dspring.profiles.active=local", "clean", "bootWar"]
#
#EXPOSE 8090 8443
#ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=dev", "/application/build/libs/core-0.0.1-SNAPSHOT.war"]
#FROM postgres
#FROM tomcat:9.0
#ENV TZ="Asia/Seoul"
#RUN ln -fns /usr/share/zoneinfo/$TZ /etc/localtime
#RUN echo $TZ > /etc/timezone
#CMD ["/usr/local/tomcat/bin/catalina.sh", "stop"]
#CMD sleep 3
#
#RUN rm -rf /usr/local/tomcat/webapps/ROOT
#COPY --from=builder /application/build/libs/core-0.0.1-SNAPSHOT.war /usr/local/tomcat/webapps/ROOT.war
#EXPOSE 8090 8443
#CMD ["/usr/local/tomcat/bin/catalina.sh", "run"]
#FROM tomcat:9.0
#ENV TZ="Asia/Seoul"
#RUN ln -fns /usr/share/zoneinfo/$TZ /etc/localtime
#RUN echo $TZ > /etc/timezone
##RUN rm -rf /usr/local/tomcat/webapps/ROOT
#COPY repo/target/kuaa-management.war /usr/local/tomcat/webapps/ROOT.war
#EXPOSE 8009 8080 8443