File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Build stage
2
+ FROM maven:3-jdk-11 as build
3
+ RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
4
+ RUN apt-get update -qq && apt-get install -qq --no-install-recommends nodejs
5
+
6
+ RUN useradd -m vaadindockerbuild
7
+ WORKDIR /app
8
+ RUN chown vaadindockerbuild:vaadindockerbuild /app
9
+ USER vaadindockerbuild
10
+
11
+ COPY --chown=vaadindockerbuild pom.xml ./
12
+ RUN mvn dependency:go-offline -Pproduction
13
+
14
+ COPY --chown=vaadindockerbuild:vaadindockerbuild src src
15
+ COPY --chown=vaadindockerbuild:vaadindockerbuild frontend frontend
16
+ COPY --chown=vaadindockerbuild:vaadindockerbuild package.json webpack.config.js ./
17
+
18
+ RUN mvn clean package -DskipTests -Pproduction
19
+
20
+ # Run stage
21
+ FROM openjdk:11
22
+
23
+ COPY --from=build /app/target/*.jar /usr/app/app.jar
24
+ RUN useradd -m vaadindockerbuild
25
+
26
+ USER vaadindockerbuild
27
+
28
+ EXPOSE 8080
29
+
30
+ CMD java -jar /usr/app/app.jar
You can’t perform that action at this time.
0 commit comments