cr-connect-bpmn/Dockerfile

25 lines
605 B
Docker
Raw Normal View History

### STAGE 1: Build ###
2020-02-01 15:40:34 +00:00
FROM node:alpine AS builder
RUN mkdir /crc-bpmn
WORKDIR /crc-bpmn
2020-02-01 15:40:34 +00:00
ADD package.json /crc-bpmn/
COPY . /crc-bpmn/
2020-01-28 21:43:38 +00:00
2020-04-14 21:21:51 +00:00
ARG build_config=staging
2020-02-01 15:40:34 +00:00
RUN npm install && \
2020-04-14 21:21:51 +00:00
npm run build:$build_config
2020-02-01 15:40:34 +00:00
### STAGE 2: Run ###
FROM nginx:alpine
COPY --from=builder /crc-frontend/dist/* /usr/share/nginx/html/
COPY --from=builder /crc-frontend/nginx.conf /etc/nginx/conf.d/default.conf
COPY ./substitute-env-variables.sh ./entrypoint.sh
RUN chmod +x ./entrypoint.sh
ENTRYPOINT ["./entrypoint.sh", "/usr/share/nginx/html/index.html"]
### STAGE 3: Profit! ###
CMD ["nginx", "-g", "daemon off;"]