fix dockerfile

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2024-10-13 00:51:38 +02:00
parent 00243906d1
commit a652b0d898

View File

@@ -9,12 +9,10 @@ WORKDIR /usr/src/app/
RUN chown app:app /usr/src/app/ RUN chown app:app /usr/src/app/
USER app USER app
# Copy pom.xml and prefetch dependencies so a repeated build can continue from the next step with existing dependencies # Copy all needed project files to a folder
COPY --chown=app ./gradle/ ./gradle COPY --chown=app ./gradle/ ./gradle
COPY --chown=app ./gradlew ./build.gradle ./settings.gradle ./app.json ./ COPY --chown=app ./gradlew ./build.gradle ./settings.gradle ./app.json ./
COPY --chown=app ./src ./src
# Copy all needed project files to a folder
COPY --chown=app:app ./src ./src
# Build the production package # Build the production package
RUN ./gradlew clean build -x test RUN ./gradlew clean build -x test