mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
2f9da976e4
## About the changes This adapts the docker creation to the latest package.json changes https://github.com/Unleash/unleash/pull/3736
36 lines
620 B
Docker
36 lines
620 B
Docker
ARG NODE_VERSION=18-alpine
|
|
|
|
FROM node:$NODE_VERSION as builder
|
|
|
|
WORKDIR /unleash
|
|
|
|
COPY . /unleash
|
|
|
|
RUN yarn config set network-timeout 300000
|
|
|
|
RUN yarn install --frozen-lockfile && yarn run build && yarn run local:package
|
|
|
|
RUN mkdir /unleash/build/frontend && cp -r /unleash/frontend/build /unleash/build/frontend/build
|
|
|
|
WORKDIR /unleash/docker
|
|
|
|
RUN yarn install --frozen-lockfile --production=true
|
|
|
|
FROM node:$NODE_VERSION
|
|
|
|
ENV NODE_ENV production
|
|
|
|
ENV TZ UTC
|
|
|
|
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"]
|