chore: only copy actual source code to the builder container

This commit is contained in:
Emmanuel BENOîT 2025-01-03 23:22:55 +01:00
parent 1ae7dbe936
commit ed6e413ae3
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg

View file

@ -3,7 +3,11 @@ ENV BUILD_UID=1000
ENV BUILD=/src
ENV MAVEN_HOME=/var/maven
RUN mkdir -p $MAVEN_HOME && chown $BUILD_UID $MAVEN_HOME
ADD --chown=$BUILD_UID:$BUILD_UID .. $BUILD
ADD --chown=$BUILD_UID:$BUILD_UID ../legacyworlds-server $BUILD/legacyworlds-server
ADD --chown=$BUILD_UID:$BUILD_UID ../legacyworlds-session $BUILD/legacyworlds-session
ADD --chown=$BUILD_UID:$BUILD_UID ../legacyworlds-utils $BUILD/legacyworlds-utils
ADD --chown=$BUILD_UID:$BUILD_UID ../legacyworlds-web $BUILD/legacyworlds-web
ADD --chown=$BUILD_UID:$BUILD_UID pom.xml $BUILD
USER $BUILD_UID
WORKDIR $BUILD
RUN --mount=type=cache,target=$MAVEN_HOME/.m2,uid=$BUILD_UID \