Adds note about Jest maxWorkers as well as the base image to start with. This is an improvement over the previous section I wrote, from me banging my head against a YAML file all week 🙃.
This came from personal difficulties in running Puppeteer tests on CircleCI. I tried to keep the note as brief as possible, while being helpful for an entire CI platform.
A freetype update broke bitmap fonts. Adding freetype-dev to the Alpine dependencies resolves related issues.
This resolves these errors when launching chromium:
```/usr/bin/chromium-browser
Error relocating /usr/lib/chromium/chrome: FT_Get_Color_Glyph_Layer: symbol not found
Error relocating /usr/lib/chromium/chrome: FT_Palette_Select: symbol not found```
Background:
https://bugs.alpinelinux.org/issues/10309https://github.com/stark/siji/issues/28https://github.com/lucy/tewi-font/issues/35
- Pins Alpine Chromium version to prevent updates from causing issues
When using these instructions today, I found that the Chromium version in the latest Alpine edge was 73, which caused errors with Puppeteer.
Pinning to the latest 72 version in Alpine registry resolved the issue, and should prevent others from running into it in the future.
* removing libgconf-2-4 install since no longer needed according to https://bugs.chromium.org/p/chromium/issues/detail?id=795759#c7
* wget is already included in `node:8-slim` image, so removed lines related to install/cleanup
* node 8 has EOL this year, so incremented to node:10-slim
* use "docker run --init" if available (available in docker-engine >= 1.13.0)
* make dumb-init optional
* combine permission changes and 'npm install' of puppeteer into same line to reduce image size by few hundred MB
* overall image size reduction: 1.21GB -> 865MB
Makes Running on Alpine up to date:
- Chrome is now available in LTS Node 10
- Chrome version is updated to the latest alpine `@edge`, 71
- Corresponding Puppeteer is updated to v1.9.0
- `harfbuzz` is now required by dynamic linking
The proposal adds a drop-down list in a similar fashion as Dependencies list since it feels a little weird to have list for a continuing detail as I assume that all the three options belong to the same level of information.
Very small change in light of operational experience while getting it running on Centos in Jenkins pipeline.
Without the `-p`, the permissions set in the `chmod` before this command are not carried over chrome cannot start.
This patch:
- migrates CI to use NPM
- drops lockfiles (`yarn.lock`). Lockfiles are ignored by package
managers when the package is installed as a dependency, so this makes CI closer to the
installation our clients run.
The jontewks buildpack worked great for running Chrome headless, but it did not include support for Chinese characters and the PDF rendering I was attempting was not usable. This fix brings in a few custom fonts to allow PDF generation to utilize the fonts.
The idea came from https://github.com/dscout/wkhtmltopdf-buildpack/pull/14/files