Fix docker multistage build
This commit is contained in:
parent
fb6ab6a07e
commit
0c02cdbf3f
1 changed files with 4 additions and 3 deletions
|
@ -1,9 +1,10 @@
|
||||||
FROM node:21
|
FROM node:21 as fronted
|
||||||
WORKDIR /home/gradle/src/app
|
COPY --chown=node:node . /home/node/src
|
||||||
|
WORKDIR /home/node/src/app
|
||||||
RUN npm install && npm run build
|
RUN npm install && npm run build
|
||||||
|
|
||||||
FROM gradle:7-jdk11 AS build
|
FROM gradle:7-jdk11 AS build
|
||||||
COPY --chown=gradle:gradle . /home/gradle/src
|
COPY --from=fronted --chown=gradle:gradle /home/node/src /home/gradle/src
|
||||||
WORKDIR /home/gradle/src
|
WORKDIR /home/gradle/src
|
||||||
RUN gradle buildFatJar --no-daemon
|
RUN gradle buildFatJar --no-daemon
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue