2022-06-28 16:13:00 +02:00
|
|
|
ARG NODE_VERSION=16-alpine
|
|
|
|
FROM node:$NODE_VERSION as builder
|
|
|
|
|
|
|
|
RUN echo "Debug - node version: $NODE_VERSION "
|
|
|
|
|
|
|
|
WORKDIR /unleash
|
|
|
|
|
|
|
|
COPY . /unleash
|
|
|
|
|
2022-08-26 09:25:31 +02:00
|
|
|
RUN yarn install --frozen-lockfile && yarn run local:package
|
2022-06-28 16:13:00 +02:00
|
|
|
|
|
|
|
WORKDIR /unleash/docker
|
|
|
|
|
|
|
|
RUN yarn install --frozen-lockfile --production=true
|
|
|
|
|
|
|
|
FROM node:$NODE_VERSION
|
|
|
|
|
|
|
|
ENV NODE_ENV production
|
|
|
|
|
|
|
|
WORKDIR /unleash
|
|
|
|
|
|
|
|
COPY --from=builder /unleash/docker /unleash
|
|
|
|
|
|
|
|
RUN rm -rf /usr/local/lib/node_modules/npm/
|
|
|
|
|
|
|
|
EXPOSE 4242
|
|
|
|
|
|
|
|
USER node
|
|
|
|
|
|
|
|
CMD ["node", "index.js"]
|