diff --git a/Dockerfile b/Dockerfile index f1373c551d..86e3bb1b9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,8 +31,24 @@ RUN apk --no-cache add \ ttf-liberation \ bash -# Install Chromium and Puppeteer for PDF generation -RUN apk --no-cache add chromium +# Install Chromium and Puppeteer for PDF generation +# Installs latest Chromium package available on Alpine (Chromium 108) +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates + +# Tell Puppeteer to skip installing Chrome. We'll be using the installed package. +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true +ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser + +# Install latest version of Puppeteer +RUN yarn add puppeteer + +# Ensure everything is executable +RUN chmod +x /usr/local/bin/* # Clean up build dependencies RUN apk del build-dependencies