more dockerfile updates

This commit is contained in:
Alexandros Mandilaras 2024-01-19 10:49:24 +02:00
parent 1dc9d2e946
commit 7f22c4e697
1 changed files with 3 additions and 8 deletions

View File

@ -13,20 +13,15 @@ COPY pom.xml /build/
COPY core /build/core/
COPY web /build/web/
COPY settings.xml /root/.m2/settings.xml
# COPY keypair.asc /tmp/keypair.asc
RUN rm -f /build/web/src/main/resources/config/app.env
RUN rm -f /build/web/src/main/resources/config/*-dev.yml
# RUN rm -f /build/web/src/main/resources/logging/*.xml
# RUN if [ "$PROFILE" = "ossrh" ]; then \
# gpg --batch --import /tmp/keypair.asc; \
# fi
WORKDIR /build/
COPY . .
RUN mvn -Drevision=${REVISION} -DdevProfileUrl=${DEV_PROFILE_URL} -P${PROFILE} dependency:go-offline
RUN mvn -Dserver.username=${CITE_MAVEN_ACCOUNT_USR} -Dserver.password=${CITE_MAVEN_ACCOUNT_PSW} -DdevProfileUrl=${DEV_PROFILE_URL} dependency:go-offline
# Build project
RUN mvn -Drevision=${REVISION} -DdevProfileUrl=${DEV_PROFILE_URL} -P${PROFILE} clean package
RUN mvn -Dserver.username=${CITE_MAVEN_ACCOUNT_USR} -Dserver.password=${CITE_MAVEN_ACCOUNT_PSW} -DdevProfileUrl=${DEV_PROFILE_URL} clean package
######################################## Run Stage ########################################
FROM eclipse-temurin:21-jre-alpine