Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
docs: use node 20 in docker examples
Martin Adámekbf6d8ffb32a6
diff --git a/docs/guides/docker_browser_js.txt b/docs/guides/docker_browser_js.txtindex afe996891..6e804b93a 100644--- a/docs/guides/docker_browser_js.txt+++ b/docs/guides/docker_browser_js.txt@@ -1,7 +1,7 @@# Specify the base Docker image. You can read more about# the available images at https://crawlee.dev/docs/guides/docker-images# You can also use any other image from Docker Hub.-FROM apify/actor-node-playwright-chrome:16+FROM apify/actor-node-playwright-chrome:20# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.diff --git a/docs/guides/docker_browser_ts.txt b/docs/guides/docker_browser_ts.txtindex e6477ffc3..1fe6784a4 100644--- a/docs/guides/docker_browser_ts.txt+++ b/docs/guides/docker_browser_ts.txt@@ -1,7 +1,7 @@# Specify the base Docker image. You can read more about# the available images at https://crawlee.dev/docs/guides/docker-images# You can also use any other image from Docker Hub.-FROM apify/actor-node-playwright-chrome:16 AS builder+FROM apify/actor-node-playwright-chrome:20 AS builder# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.@@ -19,7 +19,7 @@ COPY --chown=myuser . ./RUN npm run build# Create final image-FROM apify/actor-node-playwright-chrome:16+FROM apify/actor-node-playwright-chrome:20# Copy only built JS files from builder imageCOPY --from=builder --chown=myuser /home/myuser/dist ./distdiff --git a/docs/guides/docker_images.mdx b/docs/guides/docker_images.mdxindex fc8f9480d..30b90cbcb 100644--- a/docs/guides/docker_images.mdx+++ b/docs/guides/docker_images.mdx@@ -41,13 +41,13 @@ Each image is tagged with up to 2 version tags, depending on the type of the imaOur images are built with multiple Node.js versions to ensure backwards compatibility. Currently, Node.js **versions 16 and 18 are supported** (legacy versions still exist, see DockerHub). To select the preferred version, use the appropriate number as the image tag.```dockerfile-# Use Node.js 16-FROM apify/actor-node:16+# Use Node.js 20+FROM apify/actor-node:20```### Automation library versioning-Images that include a pre-installed automation library, which means all images that include `puppeteer` or `playwright` in their name, are also tagged with the pre-installed version of the library. For example, `apify/actor-node-puppeteer-chrome:16-13.7.0` comes with Node.js 16 and Puppeteer v13.7.0. If you try to install a different version of Puppeteer into this image, you may run into compatibility issues, because the Chromium version bundled with `puppeteer` will not match the version of Chromium that's pre-installed.+Images that include a pre-installed automation library, which means all images that include `puppeteer` or `playwright` in their name, are also tagged with the pre-installed version of the library. For example, `apify/actor-node-puppeteer-chrome:20-22.1.0` comes with Node.js 20 and Puppeteer v22.1.0. If you try to install a different version of Puppeteer into this image, you may run into compatibility issues, because the Chromium version bundled with `puppeteer` will not match the version of Chromium that's pre-installed.Similarly `apify/actor-node-playwright-firefox:14-1.21.1` runs on Node.js 14 and is pre-installed with the Firefox version that comes with v1.21.1.@@ -59,12 +59,12 @@ We also build pre-release versions of the images to test the changes we make. Th```dockerfile# Without library version.-FROM apify/actor-node:16-beta+FROM apify/actor-node:20-beta``````dockerfile# With library version.-FROM apify/actor-node-playwright-chrome:16-1.10.0-beta+FROM apify/actor-node-playwright-chrome:20-1.10.0-beta```## Best practices@@ -76,7 +76,7 @@ FROM apify/actor-node-playwright-chrome:16-1.10.0-betaIt makes sure the pre-installed version of Puppeteer or Playwright is not re-installed on build. This is important, because those libraries are only guaranteed to work with specific versions of browsers, and those browsers come pre-installed in the image.```dockerfile-FROM apify/actor-node-playwright-chrome:16+FROM apify/actor-node-playwright-chrome:20``````json@@ -105,7 +105,7 @@ This is the smallest image we have based on Alpine Linux. It does not include an​<ApiLink to="puppeteer-crawler/class/PuppeteerCrawler">`PuppeteerCrawler`</ApiLink>, <ApiLink to="playwright-crawler/class/PlaywrightCrawler">`PlaywrightCrawler`</ApiLink> and other browser based features will **NOT** work with this image.```dockerfile-FROM apify/actor-node:16+FROM apify/actor-node:20```### actor-node-puppeteer-chrome@@ -115,7 +115,7 @@ This image includes Puppeteer (Chromium) and the Chrome browser. It can be usedThe image supports XVFB by default, so you can run both `headless` and `headful` browsers with it.```dockerfile-FROM apify/actor-node-puppeteer-chrome:16+FROM apify/actor-node-puppeteer-chrome:20```### actor-node-playwright@@ -123,7 +123,7 @@ FROM apify/actor-node-puppeteer-chrome:16A very large and slow image that can run all Playwright browsers: Chromium, Chrome, Firefox, WebKit. Everything is installed. If you need to develop or test with multiple browsers, this is the image to choose, but in most cases, it's better to use the specialized images below.```dockerfile-FROM apify/actor-node-playwright:16+FROM apify/actor-node-playwright:20```### actor-node-playwright-chrome@@ -135,7 +135,7 @@ It uses the [`PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD`](https://playwright.dev/docs/apiThe image supports XVFB by default, so we can run both `headless` and `headful` browsers with it.```dockerfile-FROM apify/actor-node-playwright-chrome:16+FROM apify/actor-node-playwright-chrome:20```### actor-node-playwright-firefox@@ -144,7 +144,7 @@ Same idea as [`actor-node-playwright-chrome`](#actor-node-playwright-chrome), bupre-installed.```dockerfile-FROM apify/actor-node-playwright-firefox:16+FROM apify/actor-node-playwright-firefox:20```### actor-node-playwright-webkit@@ -153,7 +153,7 @@ Same idea as [`actor-node-playwright-chrome`](#actor-node-playwright-chrome), bupre-installed.```dockerfile-FROM apify/actor-node-playwright-webkit:16+FROM apify/actor-node-playwright-webkit:20```## Example Dockerfilediff --git a/docs/guides/docker_node_js.txt b/docs/guides/docker_node_js.txtindex 4018d6b99..4c8d11fc3 100644--- a/docs/guides/docker_node_js.txt+++ b/docs/guides/docker_node_js.txt@@ -1,7 +1,7 @@# Specify the base Docker image. You can read more about# the available images at https://crawlee.dev/docs/guides/docker-images# You can also use any other image from Docker Hub.-FROM apify/actor-node:16+FROM apify/actor-node:20# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.diff --git a/docs/guides/docker_node_ts.txt b/docs/guides/docker_node_ts.txtindex 43815f97d..995a3d815 100644--- a/docs/guides/docker_node_ts.txt+++ b/docs/guides/docker_node_ts.txt@@ -1,7 +1,7 @@# Specify the base Docker image. You can read more about# the available images at https://crawlee.dev/docs/guides/docker-images# You can also use any other image from Docker Hub.-FROM apify/actor-node:16 AS builder+FROM apify/actor-node:20 AS builder# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.@@ -19,7 +19,7 @@ COPY . ./RUN npm run build# Create final image-FROM apify/actor-node:16+FROM apify/actor-node:20# Copy only built JS files from builder imageCOPY --from=builder /usr/src/app/dist ./distdiff --git a/docs/guides/typescript_project.mdx b/docs/guides/typescript_project.mdxindex db8c2452c..0695d616e 100644--- a/docs/guides/typescript_project.mdx+++ b/docs/guides/typescript_project.mdx@@ -105,7 +105,7 @@ For `Dockerfile` we recommend using multi-stage build, so we don't install the d```dockerfile title="Dockerfile"# using multistage build, as we need dev deps to build the TS source code-FROM apify/actor-node:16 AS builder+FROM apify/actor-node:20 AS builder# copy all files, install all dependencies (including dev deps) and build the projectCOPY . ./@@ -113,7 +113,7 @@ RUN npm install --include=dev \&& npm run build# create final image-FROM apify/actor-node:16+FROM apify/actor-node:20# copy only necessary filesCOPY --from=builder /usr/src/app/package*.json ./COPY --from=builder /usr/src/app/dist ./distdiff --git a/docs/upgrading/upgrading_v3.md b/docs/upgrading/upgrading_v3.mdindex bd7f43018..aa62f6c08 100644--- a/docs/upgrading/upgrading_v3.md+++ b/docs/upgrading/upgrading_v3.md@@ -87,7 +87,7 @@ For `Dockerfile` we recommend using multi-stage build, so you don't install the```dockerfile title="Dockerfile"# using multistage build, as we need dev deps to build the TS source code-FROM apify/actor-node:16 AS builder+FROM apify/actor-node:20 AS builder# copy all files, install all dependencies (including dev deps) and build the projectCOPY . ./@@ -95,7 +95,7 @@ RUN npm install --include=dev \&& npm run build# create final image-FROM apify/actor-node:16+FROM apify/actor-node:20# copy only necessary filesCOPY --from=builder /usr/src/app/package*.json ./COPY --from=builder /usr/src/app/README.md ./diff --git a/website/versioned_docs/version-3.10/guides/docker_browser_js.txt b/website/versioned_docs/version-3.10/guides/docker_browser_js.txtindex afe996891..6e804b93a 100644--- a/website/versioned_docs/version-3.10/guides/docker_browser_js.txt+++ b/website/versioned_docs/version-3.10/guides/docker_browser_js.txt@@ -1,7 +1,7 @@# Specify the base Docker image. You can read more about# the available images at https://crawlee.dev/docs/guides/docker-images# You can also use any other image from Docker Hub.-FROM apify/actor-node-playwright-chrome:16+FROM apify/actor-node-playwright-chrome:20# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.diff --git a/website/versioned_docs/version-3.10/guides/docker_browser_ts.txt b/website/versioned_docs/version-3.10/guides/docker_browser_ts.txtindex e6477ffc3..1fe6784a4 100644--- a/website/versioned_docs/version-3.10/guides/docker_browser_ts.txt+++ b/website/versioned_docs/version-3.10/guides/docker_browser_ts.txt@@ -1,7 +1,7 @@# Specify the base Docker image. You can read more about# the available images at https://crawlee.dev/docs/guides/docker-images# You can also use any other image from Docker Hub.-FROM apify/actor-node-playwright-chrome:16 AS builder+FROM apify/actor-node-playwright-chrome:20 AS builder# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.@@ -19,7 +19,7 @@ COPY --chown=myuser . ./RUN npm run build# Create final image-FROM apify/actor-node-playwright-chrome:16+FROM apify/actor-node-playwright-chrome:20# Copy only built JS files from builder imageCOPY --from=builder --chown=myuser /home/myuser/dist ./distdiff --git a/website/versioned_docs/version-3.10/guides/docker_images.mdx b/website/versioned_docs/version-3.10/guides/docker_images.mdxindex fc8f9480d..30b90cbcb 100644--- a/website/versioned_docs/version-3.10/guides/docker_images.mdx+++ b/website/versioned_docs/version-3.10/guides/docker_images.mdx@@ -41,13 +41,13 @@ Each image is tagged with up to 2 version tags, depending on the type of the imaOur images are built with multiple Node.js versions to ensure backwards compatibility. Currently, Node.js **versions 16 and 18 are supported** (legacy versions still exist, see DockerHub). To select the preferred version, use the appropriate number as the image tag.```dockerfile-# Use Node.js 16-FROM apify/actor-node:16+# Use Node.js 20+FROM apify/actor-node:20```### Automation library versioning-Images that include a pre-installed automation library, which means all images that include `puppeteer` or `playwright` in their name, are also tagged with the pre-installed version of the library. For example, `apify/actor-node-puppeteer-chrome:16-13.7.0` comes with Node.js 16 and Puppeteer v13.7.0. If you try to install a different version of Puppeteer into this image, you may run into compatibility issues, because the Chromium version bundled with `puppeteer` will not match the version of Chromium that's pre-installed.+Images that include a pre-installed automation library, which means all images that include `puppeteer` or `playwright` in their name, are also tagged with the pre-installed version of the library. For example, `apify/actor-node-puppeteer-chrome:20-22.1.0` comes with Node.js 20 and Puppeteer v22.1.0. If you try to install a different version of Puppeteer into this image, you may run into compatibility issues, because the Chromium version bundled with `puppeteer` will not match the version of Chromium that's pre-installed.Similarly `apify/actor-node-playwright-firefox:14-1.21.1` runs on Node.js 14 and is pre-installed with the Firefox version that comes with v1.21.1.@@ -59,12 +59,12 @@ We also build pre-release versions of the images to test the changes we make. Th```dockerfile# Without library version.-FROM apify/actor-node:16-beta+FROM apify/actor-node:20-beta``````dockerfile# With library version.-FROM apify/actor-node-playwright-chrome:16-1.10.0-beta+FROM apify/actor-node-playwright-chrome:20-1.10.0-beta```## Best practices@@ -76,7 +76,7 @@ FROM apify/actor-node-playwright-chrome:16-1.10.0-betaIt makes sure the pre-installed version of Puppeteer or Playwright is not re-installed on build. This is important, because those libraries are only guaranteed to work with specific versions of browsers, and those browsers come pre-installed in the image.```dockerfile-FROM apify/actor-node-playwright-chrome:16+FROM apify/actor-node-playwright-chrome:20``````json@@ -105,7 +105,7 @@ This is the smallest image we have based on Alpine Linux. It does not include an​<ApiLink to="puppeteer-crawler/class/PuppeteerCrawler">`PuppeteerCrawler`</ApiLink>, <ApiLink to="playwright-crawler/class/PlaywrightCrawler">`PlaywrightCrawler`</ApiLink> and other browser based features will **NOT** work with this image.```dockerfile-FROM apify/actor-node:16+FROM apify/actor-node:20```### actor-node-puppeteer-chrome@@ -115,7 +115,7 @@ This image includes Puppeteer (Chromium) and the Chrome browser. It can be usedThe image supports XVFB by default, so you can run both `headless` and `headful` browsers with it.```dockerfile-FROM apify/actor-node-puppeteer-chrome:16+FROM apify/actor-node-puppeteer-chrome:20```### actor-node-playwright@@ -123,7 +123,7 @@ FROM apify/actor-node-puppeteer-chrome:16A very large and slow image that can run all Playwright browsers: Chromium, Chrome, Firefox, WebKit. Everything is installed. If you need to develop or test with multiple browsers, this is the image to choose, but in most cases, it's better to use the specialized images below.```dockerfile-FROM apify/actor-node-playwright:16+FROM apify/actor-node-playwright:20```### actor-node-playwright-chrome@@ -135,7 +135,7 @@ It uses the [`PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD`](https://playwright.dev/docs/apiThe image supports XVFB by default, so we can run both `headless` and `headful` browsers with it.```dockerfile-FROM apify/actor-node-playwright-chrome:16+FROM apify/actor-node-playwright-chrome:20```### actor-node-playwright-firefox@@ -144,7 +144,7 @@ Same idea as [`actor-node-playwright-chrome`](#actor-node-playwright-chrome), bupre-installed.```dockerfile-FROM apify/actor-node-playwright-firefox:16+FROM apify/actor-node-playwright-firefox:20```### actor-node-playwright-webkit@@ -153,7 +153,7 @@ Same idea as [`actor-node-playwright-chrome`](#actor-node-playwright-chrome), bupre-installed.```dockerfile-FROM apify/actor-node-playwright-webkit:16+FROM apify/actor-node-playwright-webkit:20```## Example Dockerfilediff --git a/website/versioned_docs/version-3.10/guides/docker_node_js.txt b/website/versioned_docs/version-3.10/guides/docker_node_js.txtindex 4018d6b99..4c8d11fc3 100644--- a/website/versioned_docs/version-3.10/guides/docker_node_js.txt+++ b/website/versioned_docs/version-3.10/guides/docker_node_js.txt@@ -1,7 +1,7 @@# Specify the base Docker image. You can read more about# the available images at https://crawlee.dev/docs/guides/docker-images# You can also use any other image from Docker Hub.-FROM apify/actor-node:16+FROM apify/actor-node:20# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.diff --git a/website/versioned_docs/version-3.10/guides/docker_node_ts.txt b/website/versioned_docs/version-3.10/guides/docker_node_ts.txtindex 43815f97d..995a3d815 100644--- a/website/versioned_docs/version-3.10/guides/docker_node_ts.txt+++ b/website/versioned_docs/version-3.10/guides/docker_node_ts.txt@@ -1,7 +1,7 @@# Specify the base Docker image. You can read more about# the available images at https://crawlee.dev/docs/guides/docker-images# You can also use any other image from Docker Hub.-FROM apify/actor-node:16 AS builder+FROM apify/actor-node:20 AS builder# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.@@ -19,7 +19,7 @@ COPY . ./RUN npm run build# Create final image-FROM apify/actor-node:16+FROM apify/actor-node:20# Copy only built JS files from builder imageCOPY --from=builder /usr/src/app/dist ./distdiff --git a/website/versioned_docs/version-3.10/guides/typescript_project.mdx b/website/versioned_docs/version-3.10/guides/typescript_project.mdxindex db8c2452c..0695d616e 100644--- a/website/versioned_docs/version-3.10/guides/typescript_project.mdx+++ b/website/versioned_docs/version-3.10/guides/typescript_project.mdx@@ -105,7 +105,7 @@ For `Dockerfile` we recommend using multi-stage build, so we don't install the d```dockerfile title="Dockerfile"# using multistage build, as we need dev deps to build the TS source code-FROM apify/actor-node:16 AS builder+FROM apify/actor-node:20 AS builder# copy all files, install all dependencies (including dev deps) and build the projectCOPY . ./@@ -113,7 +113,7 @@ RUN npm install --include=dev \&& npm run build# create final image-FROM apify/actor-node:16+FROM apify/actor-node:20# copy only necessary filesCOPY --from=builder /usr/src/app/package*.json ./COPY --from=builder /usr/src/app/dist ./distdiff --git a/website/versioned_docs/version-3.10/upgrading/upgrading_v3.md b/website/versioned_docs/version-3.10/upgrading/upgrading_v3.mdindex bd7f43018..aa62f6c08 100644--- a/website/versioned_docs/version-3.10/upgrading/upgrading_v3.md+++ b/website/versioned_docs/version-3.10/upgrading/upgrading_v3.md@@ -87,7 +87,7 @@ For `Dockerfile` we recommend using multi-stage build, so you don't install the```dockerfile title="Dockerfile"# using multistage build, as we need dev deps to build the TS source code-FROM apify/actor-node:16 AS builder+FROM apify/actor-node:20 AS builder# copy all files, install all dependencies (including dev deps) and build the projectCOPY . ./@@ -95,7 +95,7 @@ RUN npm install --include=dev \&& npm run build# create final image-FROM apify/actor-node:16+FROM apify/actor-node:20# copy only necessary filesCOPY --from=builder /usr/src/app/package*.json ./COPY --from=builder /usr/src/app/README.md ./