display/Dockerfile

27 lines
600 B
Text
Raw Normal View History

2021-11-12 16:41:27 +01:00
FROM node:14-bullseye AS build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json yarn.lock ./
RUN yarn install --silent
COPY tsconfig.json ./
COPY public ./public
COPY src ./src
ARG REACT_APP_TCL_AUTH
RUN yarn build
2021-11-12 17:36:30 +01:00
FROM alpine/git AS git
WORKDIR /app
COPY .git ./
RUN git describe --always > /version
RUN date +"%Y-%m-%d %H:%M:%S" > /date
2021-11-12 16:41:27 +01:00
FROM nginx AS prod
2021-11-12 17:36:30 +01:00
COPY --from=git /version /app/.version
COPY --from=git /date /app/.date
RUN export REACT_APP_VERSION=$(cat /app/.version)
RUN export REACT_APP_DATE=$(cat /app/.date)
2021-11-12 16:41:27 +01:00
COPY --from=build /app/build /usr/share/nginx/html