@@ -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 ./
|
||||
|
||||
# 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
|
||||
|
Reference in New Issue
Block a user