FROM node:14-alpine AS builder WORKDIR /home/node/app COPY ./web/package.json . RUN npm install -g npm@latest RUN npm install COPY ./web . # copy env file to set DOCKER_BUILD to true RUN echo "DOCKER_BUILD=1" > .env # modify index.html template to allow injection of js variables at runtime RUN sed -i '/<\/head>/i