Skip to content

Commit

Permalink
fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
aomegax committed Apr 8, 2024
1 parent 0e4ffe6 commit 77a0f1a
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,24 @@ WORKDIR /build
COPY . .
RUN mvn clean package -DskipTests

FROM amazoncorretto:17.0.10-alpine3.19@sha256:180e9c91bdbaad3599fedd2f492bf0d0335a9382835aa64669b2c2a8de7c9a22 as runtime

VOLUME /tmp
FROM amazoncorretto:17.0.10-alpine3.19@sha256:180e9c91bdbaad3599fedd2f492bf0d0335a9382835aa64669b2c2a8de7c9a22 as builder
WORKDIR /app

COPY --from=buildtime /build/target/*.jar /app/application.jar
RUN java -Djarmode=layertools -jar application.jar extract

#FROM ghcr.io/pagopa/docker-base-springboot-openjdk17:v1.1.3@sha256:a4e970ef05ecf2081424a64707e7c20856bbc40ddb3e99b32a24cd74591817c4
#COPY --chown=spring:spring --from=builder dependencies/ ./
#COPY --chown=spring:spring --from=builder snapshot-dependencies/ ./
FROM ghcr.io/pagopa/docker-base-springboot-openjdk17:v1.1.3@sha256:a4e970ef05ecf2081424a64707e7c20856bbc40ddb3e99b32a24cd74591817c4
COPY --chown=spring:spring --from=builder dependencies/ ./
COPY --chown=spring:spring --from=builder snapshot-dependencies/ ./
# https://github.com/moby/moby/issues/37965#issuecomment-426853382
#RUN true
#COPY --chown=spring:spring --from=builder spring-boot-loader/ ./
#COPY --chown=spring:spring --from=builder application/ ./
RUN true
COPY --chown=spring:spring --from=builder spring-boot-loader/ ./
COPY --chown=spring:spring --from=builder application/ ./

## https://github.com/microsoft/ApplicationInsights-Java/releases
ADD --chown=spring:spring https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.4.19/applicationinsights-agent-3.4.19.jar /app/applicationinsights-agent.jar
COPY --chown=spring:spring docker/applicationinsights.json /app/applicationinsights.json
COPY --chown=spring:spring docker/run.sh /app/run.sh
RUN chmod +x ./run.sh
#ADD --chown=spring:spring https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.4.19/applicationinsights-agent-3.4.19.jar /app/applicationinsights-agent.jar
#COPY --chown=spring:spring docker/applicationinsights.json /app/applicationinsights.json
#COPY --chown=spring:spring docker/run.sh /app/run.sh
#RUN chmod +x ./run.sh

EXPOSE 8080

Expand Down

0 comments on commit 77a0f1a

Please sign in to comment.