18 lines
295 B
Docker
18 lines
295 B
Docker
|
FROM node:18.2.0-alpine
|
||
|
|
||
|
WORKDIR /app
|
||
|
COPY . .
|
||
|
RUN npm ci
|
||
|
RUN npm audit fix
|
||
|
RUN npm run build
|
||
|
|
||
|
FROM node:18.2.0-alpine
|
||
|
|
||
|
WORKDIR /app
|
||
|
COPY --from=0 /app/package*.json ./
|
||
|
RUN npm ci --production --ignore-scripts
|
||
|
RUN npm audit fix
|
||
|
COPY --from=0 /app/build ./
|
||
|
|
||
|
EXPOSE 3000
|
||
|
CMD ["node", "./index.js"]
|