retropilot-server/Dockerfile

32 lines
495 B
Docker
Raw Normal View History

2022-03-21 09:27:22 -06:00
FROM node:16-alpine AS cabana
2022-03-26 10:19:33 -06:00
ENV CABANA_REF="73f338c543382ea3615d0dfd60a5901b05171719"
2022-03-21 09:27:22 -06:00
RUN apk update && \
apk add --no-cache git
RUN git clone https://github.com/RetroPilot/cabana.git
WORKDIR /cabana
RUN git checkout $CABANA_REF
2022-03-21 09:27:22 -06:00
RUN yarn install && \
yarn netlify-sass && \
yarn build
FROM node:16-alpine AS server
2021-09-08 17:48:24 -06:00
2022-01-20 17:02:18 -07:00
WORKDIR /app
2021-09-08 17:48:24 -06:00
2022-01-20 17:02:18 -07:00
COPY package*.json ./
RUN npm ci
2021-09-08 17:48:24 -06:00
2022-01-20 17:02:18 -07:00
COPY . .
2022-03-21 07:13:28 -06:00
RUN npm run build
2021-09-08 17:48:24 -06:00
2022-03-21 09:27:22 -06:00
COPY --from=cabana /cabana/build cabana
EXPOSE 8080
2022-03-21 07:13:28 -06:00
CMD ["npm", "run", "server"]