Skip to content

Commit

Permalink
build(docker): fix chromium favour (DIYgod#11027)
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyRL authored Oct 8, 2022
1 parent fd117cb commit 4f4be1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ RUN \
yarn add puppeteer@$(cat /app/.puppeteer_version) && \
yarn cache clean ; \
else \
mkdir -p /app/node_modules/puppeteer ; \
mkdir -p /app/node_modules/puppeteer-core ; \
fi;

# ---------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -143,14 +143,14 @@ RUN \
fi; \
rm -rf /var/lib/apt/lists/*

COPY --from=chromium-downloader /app/node_modules/puppeteer /app/node_modules/puppeteer
COPY --from=chromium-downloader /app/node_modules/puppeteer-core /app/node_modules/puppeteer-core

# if grep matches nothing then it will exit with 1, thus, we cannot `set -e` here
RUN \
set -x && \
if [ "$PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" = 0 ] && [ "$TARGETPLATFORM" = 'linux/amd64' ]; then \
echo 'Verifying Chromium installation...' && \
ldd $(find /app/node_modules/puppeteer/ -name chrome) | grep "not found" ; \
ldd $(find /app/node_modules/puppeteer-core/ -name chrome) | grep "not found" ; \
if [ "$?" = 0 ]; then \
echo "!!! Chromium has unmet shared libs !!!" && \
exit 1 ; \
Expand Down

0 comments on commit 4f4be1f

Please sign in to comment.