-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (33 loc) · 830 Bytes
/
Dockerfile
File metadata and controls
33 lines (33 loc) · 830 Bytes
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
# (1)
FROM maven:3-openjdk-17-slim as build
# (2)
RUN useradd -m edurbs
# (3)
WORKDIR /usr/src/scriptureearth2meps/
# (4)
RUN chown edurbs:edurbs /usr/src/scriptureearth2meps/
# (5)
USER edurbs
# (6)
COPY --chown=edurbs pom.xml ./
# (7)
RUN mvn dependency:go-offline -Pproduction
# (8)
COPY --chown=edurbs:edurbs src src
COPY --chown=edurbs:edurbs frontend frontend
COPY --chown=edurbs:edurbs package.json ./
COPY --chown=edurbs:edurbs package-lock.json* pnpm-lock.yaml* webpack.config.js* ./
# (9)
RUN mvn clean package -DskipTests -Pproduction
# (10)
FROM openjdk:17-jdk-slim
# (11)
COPY --from=build /usr/src/scriptureearth2meps/target/*.jar /usr/scriptureearth2meps/scriptureearth2meps.jar
# (12)
RUN useradd -m edurbs
# (13)
USER edurbs
# (14)
EXPOSE 8080
# (15)
CMD java -jar /usr/scriptureearth2meps/scriptureearth2meps.jar