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
chore(templates): bump actor base images to Node 24 (#3654)
Martin Adámekacf44905ac7a
diff --git a/docs/guides/docker_images.mdx b/docs/guides/docker_images.mdxindex f22060c41..1129fc804 100644--- a/docs/guides/docker_images.mdx+++ b/docs/guides/docker_images.mdx@@ -38,18 +38,18 @@ Each image is tagged with up to 2 version tags, depending on the type of the ima### Node.js versioning-Our 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.+Our images are built with multiple Node.js versions to ensure backwards compatibility. Currently, Node.js **versions 20, 22, and 24 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 20-FROM apify/actor-node:20+# Use Node.js 24+FROM apify/actor-node:24```### 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: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.+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:24-24.43.1` comes with Node.js 24 and Puppeteer v24.43.1. 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.+Similarly `apify/actor-node-playwright-firefox:24-1.60.0` runs on Node.js 24 and is pre-installed with the Firefox version that comes with v1.60.0.Installing `apify/actor-node-puppeteer-chrome` (without a tag) will install the latest available version of Node.js and `puppeteer`.@@ -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:20-beta+FROM apify/actor-node:24-beta``````dockerfile# With library version.-FROM apify/actor-node-playwright-chrome:20-1.10.0-beta+FROM apify/actor-node-playwright-chrome:24-1.60.0-beta```## Best practices@@ -76,21 +76,21 @@ For production crawlers, we recommend pinning both the Node.js version **and** tMatch the automation library version in your `package.json` with the version in your Docker image tag:```dockerfile-FROM apify/actor-node-playwright-chrome:22-1.52.0+FROM apify/actor-node-playwright-chrome:24-1.60.0``````json{"dependencies": {"crawlee": "^3.0.0",- "playwright": "1.52.0"+ "playwright": "1.60.0"}}```:::warning Why version matching matters-If you pin the Docker image to `22-1.52.0` but install a different Playwright version via `package.json`, you may encounter browser compatibility issues. The browsers pre-installed in the image are specifically built for that Playwright version.+If you pin the Docker image to `24-1.60.0` but install a different Playwright version via `package.json`, you may encounter browser compatibility issues. The browsers pre-installed in the image are specifically built for that Playwright version.:::@@ -99,7 +99,7 @@ If you pin the Docker image to `22-1.52.0` but install a different Playwright veYou can also use asterisk `*` as the automation library version in your `package.json`:```dockerfile-FROM apify/actor-node-playwright-chrome:22+FROM apify/actor-node-playwright-chrome:24``````json@@ -147,7 +147,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:20+FROM apify/actor-node:24```### actor-node-puppeteer-chrome@@ -157,7 +157,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:20+FROM apify/actor-node-puppeteer-chrome:24```### actor-node-playwright@@ -165,7 +165,7 @@ FROM apify/actor-node-puppeteer-chrome:20A 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:20+FROM apify/actor-node-playwright:24```### actor-node-playwright-chrome@@ -177,7 +177,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:20+FROM apify/actor-node-playwright-chrome:24```### actor-node-playwright-firefox@@ -186,7 +186,7 @@ Same idea as [`actor-node-playwright-chrome`](#actor-node-playwright-chrome), bupre-installed.```dockerfile-FROM apify/actor-node-playwright-firefox:20+FROM apify/actor-node-playwright-firefox:24```### actor-node-playwright-webkit@@ -195,7 +195,7 @@ Same idea as [`actor-node-playwright-chrome`](#actor-node-playwright-chrome), bupre-installed.```dockerfile-FROM apify/actor-node-playwright-webkit:20+FROM apify/actor-node-playwright-webkit:24```## Example Dockerfilediff --git a/packages/templates/templates/cheerio-js/Dockerfile b/packages/templates/templates/cheerio-js/Dockerfileindex 86de12656..e796abd1a 100644--- a/packages/templates/templates/cheerio-js/Dockerfile+++ b/packages/templates/templates/cheerio-js/Dockerfile@@ -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:20+FROM apify/actor-node:24# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.diff --git a/packages/templates/templates/cheerio-ts/Dockerfile b/packages/templates/templates/cheerio-ts/Dockerfileindex befbf5e84..a139c428b 100644--- a/packages/templates/templates/cheerio-ts/Dockerfile+++ b/packages/templates/templates/cheerio-ts/Dockerfile@@ -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:20 AS builder+FROM apify/actor-node:24 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:20+FROM apify/actor-node:24# Copy only built JS files from builder imageCOPY --from=builder /usr/src/app/dist ./distdiff --git a/packages/templates/templates/empty-js/Dockerfile b/packages/templates/templates/empty-js/Dockerfileindex 4c8d11fc3..7534e8911 100644--- a/packages/templates/templates/empty-js/Dockerfile+++ b/packages/templates/templates/empty-js/Dockerfile@@ -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:20+FROM apify/actor-node:24# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.diff --git a/packages/templates/templates/empty-ts/Dockerfile b/packages/templates/templates/empty-ts/Dockerfileindex 995a3d815..ea0cf5454 100644--- a/packages/templates/templates/empty-ts/Dockerfile+++ b/packages/templates/templates/empty-ts/Dockerfile@@ -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:20 AS builder+FROM apify/actor-node:24 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:20+FROM apify/actor-node:24# Copy only built JS files from builder imageCOPY --from=builder /usr/src/app/dist ./distdiff --git a/packages/templates/templates/puppeteer-js/Dockerfile b/packages/templates/templates/puppeteer-js/Dockerfileindex 9e150f167..663e47d09 100644--- a/packages/templates/templates/puppeteer-js/Dockerfile+++ b/packages/templates/templates/puppeteer-js/Dockerfile@@ -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-puppeteer-chrome:20+FROM apify/actor-node-puppeteer-chrome:24# Copy just package.json and package-lock.json# to speed up the build using Docker layer cache.diff --git a/packages/templates/templates/puppeteer-ts/Dockerfile b/packages/templates/templates/puppeteer-ts/Dockerfileindex cd384312e..523a1bb0c 100644--- a/packages/templates/templates/puppeteer-ts/Dockerfile+++ b/packages/templates/templates/puppeteer-ts/Dockerfile@@ -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-puppeteer-chrome:20 AS builder+FROM apify/actor-node-puppeteer-chrome:24 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-puppeteer-chrome:20+FROM apify/actor-node-puppeteer-chrome:24# Copy only built JS files from builder imageCOPY --from=builder --chown=myuser /home/myuser/dist ./distdiff --git a/website/versioned_docs/version-3.16/guides/docker_images.mdx b/website/versioned_docs/version-3.16/guides/docker_images.mdxindex f22060c41..1129fc804 100644--- a/website/versioned_docs/version-3.16/guides/docker_images.mdx+++ b/website/versioned_docs/version-3.16/guides/docker_images.mdx@@ -38,18 +38,18 @@ Each image is tagged with up to 2 version tags, depending on the type of the ima### Node.js versioning-Our 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.+Our images are built with multiple Node.js versions to ensure backwards compatibility. Currently, Node.js **versions 20, 22, and 24 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 20-FROM apify/actor-node:20+# Use Node.js 24+FROM apify/actor-node:24```### 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: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.+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:24-24.43.1` comes with Node.js 24 and Puppeteer v24.43.1. 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.+Similarly `apify/actor-node-playwright-firefox:24-1.60.0` runs on Node.js 24 and is pre-installed with the Firefox version that comes with v1.60.0.Installing `apify/actor-node-puppeteer-chrome` (without a tag) will install the latest available version of Node.js and `puppeteer`.@@ -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:20-beta+FROM apify/actor-node:24-beta``````dockerfile# With library version.-FROM apify/actor-node-playwright-chrome:20-1.10.0-beta+FROM apify/actor-node-playwright-chrome:24-1.60.0-beta```## Best practices@@ -76,21 +76,21 @@ For production crawlers, we recommend pinning both the Node.js version **and** tMatch the automation library version in your `package.json` with the version in your Docker image tag:```dockerfile-FROM apify/actor-node-playwright-chrome:22-1.52.0+FROM apify/actor-node-playwright-chrome:24-1.60.0``````json{"dependencies": {"crawlee": "^3.0.0",- "playwright": "1.52.0"+ "playwright": "1.60.0"}}```:::warning Why version matching matters-If you pin the Docker image to `22-1.52.0` but install a different Playwright version via `package.json`, you may encounter browser compatibility issues. The browsers pre-installed in the image are specifically built for that Playwright version.+If you pin the Docker image to `24-1.60.0` but install a different Playwright version via `package.json`, you may encounter browser compatibility issues. The browsers pre-installed in the image are specifically built for that Playwright version.:::@@ -99,7 +99,7 @@ If you pin the Docker image to `22-1.52.0` but install a different Playwright veYou can also use asterisk `*` as the automation library version in your `package.json`:```dockerfile-FROM apify/actor-node-playwright-chrome:22+FROM apify/actor-node-playwright-chrome:24``````json@@ -147,7 +147,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:20+FROM apify/actor-node:24```### actor-node-puppeteer-chrome@@ -157,7 +157,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:20+FROM apify/actor-node-puppeteer-chrome:24```### actor-node-playwright@@ -165,7 +165,7 @@ FROM apify/actor-node-puppeteer-chrome:20A 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:20+FROM apify/actor-node-playwright:24```### actor-node-playwright-chrome@@ -177,7 +177,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:20+FROM apify/actor-node-playwright-chrome:24```### actor-node-playwright-firefox@@ -186,7 +186,7 @@ Same idea as [`actor-node-playwright-chrome`](#actor-node-playwright-chrome), bupre-installed.```dockerfile-FROM apify/actor-node-playwright-firefox:20+FROM apify/actor-node-playwright-firefox:24```### actor-node-playwright-webkit@@ -195,7 +195,7 @@ Same idea as [`actor-node-playwright-chrome`](#actor-node-playwright-chrome), bupre-installed.```dockerfile-FROM apify/actor-node-playwright-webkit:20+FROM apify/actor-node-playwright-webkit:24```## Example Dockerfile