2022-05-03 06:17:28 +00:00
|
|
|
FROM node:16-bullseye as base
|
|
|
|
RUN apt-get update && apt-get install -y openssl
|
2022-04-29 02:09:40 +00:00
|
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
2022-04-30 09:55:28 +00:00
|
|
|
ADD yarn.lock package.json ./
|
2022-05-03 06:17:28 +00:00
|
|
|
RUN npm rebuild bcrypt --build-from-source
|
2022-04-29 02:40:13 +00:00
|
|
|
RUN yarn install --production
|
|
|
|
|
2022-05-03 06:17:28 +00:00
|
|
|
FROM node:16-bullseye-slim as prod
|
|
|
|
RUN apt-get update && apt-get install openssl tini && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
2022-04-30 08:43:24 +00:00
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=base /app /app
|
2022-04-30 09:55:28 +00:00
|
|
|
ADD . .
|
2022-05-03 06:17:28 +00:00
|
|
|
ENTRYPOINT ["/usr/bin/tini","-g", "--"]
|
|
|
|
CMD ["node", "app.js"]
|