Skip to content

Commit

Permalink
build: обновлен Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Djaler committed Jul 8, 2024
1 parent 39d0db0 commit 20af5e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1.3
FROM openjdk:11-jdk-slim-bullseye as base
FROM openjdk:11-jdk-slim-bullseye as build

WORKDIR /app

Expand All @@ -15,18 +15,16 @@ RUN --mount=type=cache,target=/root/.gradle/caches \

COPY src/main ./src/main

FROM base as build

RUN --mount=type=cache,target=/root/.gradle/caches \
--mount=type=cache,target=/root/.gradle/wrapper \
./gradlew build

RUN jar xf build/libs/*.jar BOOT-INF META-INF
RUN java -Djarmode=layertools -jar build/libs/evil-bot-1.0.jar extract

FROM openjdk:11-jre-slim-bullseye

COPY --from=build /app/BOOT-INF/lib ./lib
COPY --from=build /app/META-INF ./META-INF
COPY --from=build /app/BOOT-INF/classes ./
COPY --from=build /app/dependencies/ ./
COPY --from=build /app/spring-boot-loader/ ./
COPY --from=build /app/snapshot-dependencies/ ./
COPY --from=build /app/application/ ./

ENTRYPOINT exec java -cp .:./lib/* com.github.djaler.evilbot.ApplicationKt
ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"]
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

group = "com.github.djaler"
version = "1.0-SNAPSHOT"
version = "1.0"

repositories {
mavenCentral()
Expand Down

0 comments on commit 20af5e0

Please sign in to comment.