2022-03-17 11:43:17 +01:00
|
|
|
# Build ARGS for base image versions
|
|
|
|
ARG NODE_BASE=lts-buster-slim
|
2022-11-28 20:35:52 +01:00
|
|
|
ARG NGINX_BASE=1.23.2-alpine
|
2022-03-17 11:43:17 +01:00
|
|
|
|
|
|
|
FROM node:${NODE_BASE} as builder
|
2021-12-23 14:26:58 +01:00
|
|
|
COPY . /src
|
|
|
|
#RUN ls -la
|
|
|
|
WORKDIR /src
|
|
|
|
#RUN ls -a
|
2022-01-04 09:27:51 +01:00
|
|
|
RUN npm install \
|
|
|
|
&& npm run build
|
2021-12-23 14:26:58 +01:00
|
|
|
|
2022-03-17 11:43:17 +01:00
|
|
|
FROM nginx:${NGINX_BASE} as prod
|
2021-12-23 14:26:58 +01:00
|
|
|
LABEL maintainer="marco.blessing@googlemail.com"
|
2022-01-20 16:12:38 +01:00
|
|
|
HEALTHCHECK --interval=15s --timeout=5s \
|
2022-01-13 09:35:23 +01:00
|
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1
|
|
|
|
COPY --from=builder src/public /usr/share/nignx/html/
|
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|