Skip to content

Commit 759f97e

Browse files
committed
Refactor: Simplify Dockerfile cleanup for Maven build artifacts
Combine removal commands into a single step for improved readability and maintainability. Cleanup includes redundant files and directories such as `target` and unused `pom.xml`.
1 parent 13b4d53 commit 759f97e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ RUN mvn --batch-mode \
3535

3636
RUN mv /build/ExportsLibreService/target/SelfSudoc.war ./SelfSudoc.war
3737

38-
RUN rm /build/ExportsLibreService/pom.xml
39-
RUN mv /build/ExportsLibreService/pom-filedownload.xml /build/ExportsLibreService/pom.xml
38+
RUN rm -f /build/ExportsLibreService/pom.xml && \
39+
rm -Rf /build/ExportsLibreService/target && \
40+
mv /build/ExportsLibreService/pom-filedownload.xml /build/ExportsLibreService/pom.xml
4041

4142
RUN mvn --batch-mode \
4243
-Dmaven.test.skip=true \

0 commit comments

Comments
 (0)