2021-03-08 17:02:04 +01:00
|
|
|
FROM docker.io/node:alpine as builder
|
2021-09-29 19:31:39 -07:00
|
|
|
RUN apk add --no-cache git python3 build-base
|
2023-01-11 18:55:28 +00:00
|
|
|
|
2021-03-08 17:02:04 +01:00
|
|
|
WORKDIR /app
|
2023-01-11 18:55:28 +00:00
|
|
|
|
|
|
|
# Copy package.json and yarn.lock and install dependencies first to speed up subsequent builds
|
|
|
|
COPY package.json yarn.lock /app/
|
|
|
|
RUN yarn install
|
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
RUN yarn build
|
2021-03-08 17:02:04 +01:00
|
|
|
|
|
|
|
FROM docker.io/nginx:alpine
|
2023-01-11 18:06:25 +00:00
|
|
|
|
|
|
|
# Copy the dynamic config script
|
|
|
|
COPY ./docker/dynamic-config.sh /docker-entrypoint.d/99-dynamic-config.sh
|
|
|
|
|
|
|
|
# Copy the built app from the first build stage
|
2021-03-08 17:02:04 +01:00
|
|
|
COPY --from=builder /app/target /usr/share/nginx/html
|