diff --git a/Dockerfile b/Dockerfile index 1eb5b2a..30cf3d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,27 @@ +# syntax=docker/dockerfile:1.7-labs FROM node:22 AS fe-build RUN mkdir /mnt/workspace WORKDIR /mnt/workspace +RUN cd /mnt/workspace COPY ./frontend /mnt/workspace RUN npm install --global pnpm \ && pnpm install \ - && pnpm run build \ + && pnpm run build FROM gradle AS be-build RUN mkdir /mnt/workspace WORKDIR /mnt/workspace +RUN cd /mnt/workspace -COPY --exclude=./frontend . ./mnt/workspace +COPY --exclude=./frontend . /mnt/workspace -RUN ./gradlew -x test build +RUN ./gradlew build -x test -FROM eclipse-temurin:21-jre-nanoserver +FROM eclipse-temurin:21-jre-alpine ENV USE_SYSTEM_CA_CERTS=1 @@ -28,4 +31,4 @@ WORKDIR /opt/home-cert-assistant COPY --from=fe-build /mnt/workspace/dist /opt/home-cert-assistant/frontend COPY --from=be-build /mnt/workspace/build/home-cert-assistant-0.0.1-SNAPSHOT.jar /opt/home-cert-assistant/ -CMD ["java", "-jar", "/opt/home-cert-assistant/.jar"] \ No newline at end of file +CMD ["java", "-jar", "/opt/home-cert-assistant/home-cert-assistant-0.0.1-SNAPSHOT.jar"] \ No newline at end of file