-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
FROM node:20-alpine | ||
|
||
# Install packages for headless chrome | ||
RUN apk update \ | ||
&& \ | ||
apk add --no-cache nmap \ | ||
&& \ | ||
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ | ||
&& \ | ||
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ | ||
&& \ | ||
apk update \ | ||
&& \ | ||
apk add --no-cache \ | ||
# Packages needed for npm install of mozjpeg & cwebp, can't --virtual and apk del later | ||
# Pre-builts do not work on alpine for either: | ||
# ref: https://github.com/imagemin/imagemin/issues/168 | ||
# ref: https://github.com/imagemin/cwebp-bin/issues/27 | ||
autoconf \ | ||
automake \ | ||
build-base \ | ||
g++ \ | ||
gcc \ | ||
glu \ | ||
libc6-compat \ | ||
libtool \ | ||
libpng-dev \ | ||
libxxf86vm \ | ||
make \ | ||
nasm \ | ||
# Misc packages | ||
nano \ | ||
# Image optimization packages | ||
gifsicle \ | ||
jpegoptim \ | ||
libpng-dev \ | ||
libwebp-tools \ | ||
libjpeg-turbo-dev \ | ||
libjpeg-turbo-utils \ | ||
optipng \ | ||
pngquant \ | ||
# Headless Chrome packages | ||
chromium \ | ||
harfbuzz \ | ||
"freetype>2.8" \ | ||
ttf-freefont \ | ||
nss | ||
|
||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true | ||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser | ||
ENV CHROME_BIN /usr/bin/chromium-browser | ||
ENV LIGHTHOUSE_CHROMIUM_PATH /usr/bin/chromium-browser |