File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1- FROM node:14
1+ FROM node:14-alpine as deps
2+ RUN apk add --no-cache bash make git python3
3+ RUN apk add --update alpine-sdk
24WORKDIR /usr/src/app
35# Do `npm ci` separately so we can cache `node_modules`
46# https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
57COPY package*.json ./
68RUN npm clean-install
9+
10+ FROM node:14-alpine as build
11+ WORKDIR /usr/src/app
12+ COPY --from=deps /usr/src/app/node_modules ./node_modules
713COPY . .
814RUN npm run build:server
15+
16+ FROM node:14-alpine as prod
17+ WORKDIR /usr/src/app
18+ COPY --from=deps /usr/src/app/node_modules ./node_modules
19+ COPY --from=build /usr/src/app/bin ./bin
20+ COPY package.json ./
921ENV PG_META_PORT=8080
1022CMD ["npm" , "run" , "start" ]
1123EXPOSE 8080
You can’t perform that action at this time.
0 commit comments