mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: change the Alpine Docker example to use env instead of launch option (#5666)
This commit is contained in:
parent
20c22ad9ad
commit
35fc65492d
@ -341,7 +341,8 @@ RUN apk add --no-cache \
|
||||
...
|
||||
|
||||
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
|
||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
||||
|
||||
# Puppeteer v1.19.0 works with Chromium 77.
|
||||
RUN yarn add puppeteer@1.19.0
|
||||
@ -358,14 +359,6 @@ USER pptruser
|
||||
...
|
||||
```
|
||||
|
||||
And when launching Chrome, be sure to use the `chromium-browser` executable:
|
||||
|
||||
```js
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath: '/usr/bin/chromium-browser'
|
||||
});
|
||||
```
|
||||
|
||||
#### Tips
|
||||
|
||||
By default, Docker runs a container with a `/dev/shm` shared memory space 64MB.
|
||||
|
Loading…
Reference in New Issue
Block a user