-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
48 lines (33 loc) · 1.23 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# syntax=docker/dockerfile:1
# ---------------------------------------------------------------------------
FROM node:16.20.2-bookworm AS web
WORKDIR /work
COPY package.json package-lock.json build.sh /work/
RUN npm install --legacy-peer-deps
COPY src/main/resources/assets /work/src/main/resources/assets
RUN ./build.sh --npm
RUN ./build.sh --jsx-force
# ---------------------------------------------------------------------------
FROM maven:3.9.9-eclipse-temurin-11-focal AS jar
WORKDIR /work
# might be required for caching of maven deps?
#ENV MAVEN_OPTS=-Dmaven.repo.local=./.m2/
COPY pom.xml /work/
RUN mvn -q dependency:resolve-plugins
RUN mvn -q dependency:resolve
#RUN mvn -q dependency:go-offline
COPY src /work/src
COPY build.sh /work/
COPY --from=web /work/src/main/resources/assets /work/src/main/resources/assets
RUN ./build.sh --jar
#RUN mvn -o -q clean package
# ---------------------------------------------------------------------------
# https://github.com/docker-library/openjdk/issues/505
# TODO: upgrade to 17
FROM eclipse-temurin:11-jre-jammy AS run
WORKDIR /app
COPY --from=jar /work/target/aggregator-*.jar /app/target/
COPY build.sh /app/
COPY aggregator.yml /app/
EXPOSE 4019
ENTRYPOINT [ "./build.sh", "--run-production" ]