ci: Create Dockerfile to build a basic container image
This commit is contained in:
parent
7def9ba4f1
commit
39164401e6
1 changed files with 31 additions and 0 deletions
31
Dockerfile
Normal file
31
Dockerfile
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
FROM node:22 AS fe-build
|
||||||
|
|
||||||
|
RUN mkdir /mnt/workspace
|
||||||
|
WORKDIR /mnt/workspace
|
||||||
|
|
||||||
|
COPY ./frontend /mnt/workspace
|
||||||
|
|
||||||
|
RUN npm install --global pnpm \
|
||||||
|
&& pnpm install \
|
||||||
|
&& pnpm run build \
|
||||||
|
|
||||||
|
FROM gradle AS be-build
|
||||||
|
|
||||||
|
RUN mkdir /mnt/workspace
|
||||||
|
WORKDIR /mnt/workspace
|
||||||
|
|
||||||
|
COPY --exclude=./frontend . ./mnt/workspace
|
||||||
|
|
||||||
|
RUN ./gradlew -x test build
|
||||||
|
|
||||||
|
FROM eclipse-temurin:21-jre-nanoserver
|
||||||
|
|
||||||
|
ENV USE_SYSTEM_CA_CERTS=1
|
||||||
|
|
||||||
|
RUN mkdir /opt/home-cert-assistant
|
||||||
|
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"]
|
Loading…
Add table
Reference in a new issue