FROM harbor.uio.no/library/docker.io-node:14-alpine as build-stage LABEL org.opencontainers.image.authors="bnt-int@usit.uio.no" LABEL no.uio.contact="bnt-int@usit.uio.no" ### Build stage RUN npm install -g npm COPY . /app ENV NODE_ENV=production RUN cd /app/ && npm ci && npm run build:no-env ### Final image FROM harbor.uio.no/library/docker.io-nginx:latest # Install various utilities # jq is needed for the docker entrypoint RUN apt-get update && apt-get install -y --no-install-recommends \ jq \ wget \ less \ nano \ && rm -rf /var/lib/apt/lists/* # Include the built app and its docker entrypoint COPY --from=build-stage /app/build /app/build COPY ./docker-entrypoint.sh /docker-entrypoint.d/90-greg-frontend-env.sh CMD ["nginx", "-g", "daemon off;"]