Skip to content

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.

fix: install browser in the `camoufox` template correctly (#2864)

Jindřich Bära9d008c6f36a
diff --git a/packages/templates/templates/camoufox-ts/Dockerfile b/packages/templates/templates/camoufox-ts/Dockerfile
index fe5504c41..3c8f7f4f6 100644
--- a/packages/templates/templates/camoufox-ts/Dockerfile
+++ b/packages/templates/templates/camoufox-ts/Dockerfile
@@ -7,7 +7,6 @@ FROM apify/actor-node-playwright-chrome:20 AS builder
# to speed up the build using Docker layer cache.
COPY --chown=myuser package*.json ./
-ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
# Install all dependencies. Don't audit to speed up the installation.
RUN npm install --include=dev --audit=false
@@ -29,6 +28,8 @@ COPY --from=builder --chown=myuser /home/myuser/dist ./dist
# to speed up the build using Docker layer cache.
COPY --chown=myuser package*.json ./
+# Ensure we'll install Camoufox using the npm postinstall script
+ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
# Install NPM packages, skip optional and development dependencies to
# keep the image small. Avoid logging too much and print the dependency
# tree for debugging