tornado-relayer/Dockerfile

31 lines
500 B
Docker
Raw Normal View History

FROM node:16-alpine as dev
ENV NODE_ENV=development
WORKDIR /usr/app
COPY yarn.lock .
COPY package.json .
RUN yarn install && yarn cache clean
2019-07-18 15:22:56 +02:00
COPY . .
RUN yarn build
FROM node:16-alpine as production
ENV NODE_ENV=production
WORKDIR /app
COPY --from=dev /usr/app/build /app
COPY --from=dev /usr/app/package.json /app/
COPY --from=dev /usr/app/yarn.lock /app/
RUN chown -R node: .
USER node
RUN yarn install --non-interactive --frozen-lockfile && yarn cache clean
CMD ["node", "index.js"]