1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/Dockerfile
Gard Rimestad 5d5fc37dfd
Feat/docker container on main builds (#1762)
* feat: build docker containers when pushing to main

The intent here is to publish a docker container for every build of
main. This will make it easier to run the tip of main.
2022-06-28 16:13:00 +02:00

31 lines
505 B
Docker

ARG NODE_VERSION=16-alpine
FROM node:$NODE_VERSION as builder
RUN echo "Debug - node version: $NODE_VERSION "
WORKDIR /unleash
COPY . /unleash
RUN yarn install --frozen-lockfile --ignore-scripts && yarn run build
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"]