From b3cf4c754a5831ba6de52e9dd1fffd4d2d13c26c Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Fri, 14 Nov 2025 17:49:49 +0700 Subject: [PATCH] Update Dockerfile --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ccfc4fc..8dd65e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,8 @@ WORKDIR /build COPY ./src src/ RUN --mount=type=cache,target=/root/.gradle \ --mount=type=cache,target=/build/build \ - ./gradlew distTar -x check -x test --no-daemon --parallel --build-cache + ./gradlew distTar -x check -x test --no-daemon --parallel --build-cache && \ + cp build/distributions/*.tar app.tar FROM eclipse-temurin:21.0.9_10-jre-alpine AS final ARG UID=10001 @@ -25,6 +26,6 @@ RUN adduser \ appuser USER appuser WORKDIR /app -COPY --from=package /build/build/distributions/*.tar.gz app.tar.gz -RUN tar -xzf app.tar.gz --strip-components=1 && rm app.tar.gz -ENTRYPOINT ["sh", "-c", "bin/com.miti99.storescraperbot"] +COPY --from=package /build/dist.tar dist.tar +RUN tar -xzf app.tar --strip-components=1 && rm app.tar +ENTRYPOINT ["sh", "-c", "cd /app && ./bin/store-scraper-bot"]