vector-im-hydrogen-web/Dockerfile
Bruno Windels 86ce54d69c
Merge pull request #983 from vector-im/hughns/docker-deps-layer
Install npm deps in separate docker layer
2023-01-17 08:50:45 +00:00

20 lines
513 B
Docker

FROM docker.io/node:alpine as builder
RUN apk add --no-cache git python3 build-base
WORKDIR /app
# 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
FROM docker.io/nginx:alpine
# 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
COPY --from=builder /app/target /usr/share/nginx/html