diff --git a/Dockerfile b/Dockerfile index 037d238..09748d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,12 +9,10 @@ WORKDIR /usr/src/app/ RUN chown app:app /usr/src/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 ./gradlew ./build.gradle ./settings.gradle ./app.json ./ - -# Copy all needed project files to a folder -COPY --chown=app:app ./src ./src +COPY --chown=app ./src ./src # Build the production package RUN ./gradlew clean build -x test