File tree Expand file tree Collapse file tree 3 files changed +196
-620
lines changed Expand file tree Collapse file tree 3 files changed +196
-620
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,13 @@ ARG SPRING_ACTIVE_PROFILE
1111ENV SPRING_PROFILES_ACTIVE=${SPRING_ACTIVE_PROFILE}
1212
1313# Copiar código fonte e configurações Maven
14- COPY mvnw ./mvnw
15- COPY .mvn ./.mvn
16- COPY pom.xml ./pom.xml
14+ COPY mvnw mvnw.cmd pom.xml ./
15+ COPY .mvn/ .mvn/
1716RUN chmod +x mvnw && ./mvnw dependency:go-offline -B
1817
1918COPY src ./src
2019# Compilar aplicação e gerar executável nativo completo e statico
21- RUN ./mvnw -Pnative clean package -DskipTests -Dnative-image.options= "--static --libc=musl -O2 --no-fallback"
20+ RUN ./mvnw -Pnative clean package -DskipTests
2221
2322# ===================================================================
2423# Runtime stage: minimal static binary
@@ -29,7 +28,7 @@ FROM gcr.io/distroless/static:nonroot
2928WORKDIR /app
3029
3130# Copy the native executable (artifactId assumed "access-management")
32- COPY --from=build /app/target/access-management /app/access-management
31+ COPY --from=build /app/target/*-runner /app/access-management
3332
3433# Expor porta e executar aplicação
3534EXPOSE 8080
You can’t perform that action at this time.
0 commit comments