Fix docker image build failure after node:lts-alpine changed to 18.

Base image for building the frontend is referenced with its tag on
the Dockerfile (FROM node:lts-alpine). The tag has been recently
changed, and now points to version 18 of nodejs.

Attempting to build with new lts (v.18), results in an error when
building the frontend:
 > [frontend-build 8/8] RUN yarn build:

Adding the ENV var has fixed the build issue, and the container image
is now produced without errors.
This commit is contained in:
George Adamopoulos 2022-12-22 22:23:50 +02:00
parent 076b496bf6
commit d52cf1ca63

View file

@ -2,6 +2,7 @@ FROM --platform=$BUILDPLATFORM node:lts-alpine as frontend-build
ENV INLINE_RUNTIME_CHUNK=false
ENV GENERATE_SOURCEMAP=false
ENV NODE_OPTIONS=--openssl-legacy-provider
WORKDIR /app/frontend
COPY yarn.lock .yarnrc.yml ./