Skip to content

Commit

Permalink
chore: mark built images as having browsers installed (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu committed Oct 2, 2023
1 parent a2359ae commit 5528fdd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions node-playwright-chrome/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ COPY --chown=myuser:myuser package.json main.js chrome_test.js start_xvfb_and_ru
# Sets path to Chrome executable, this is used by Apify.launchPuppeteer()
ENV APIFY_CHROME_EXECUTABLE_PATH=/usr/bin/google-chrome

# Tell the crawlee cli that we already have browers installed, so it skips installing them
ENV CRAWLEE_SKIP_BROWSER_INSTALL=1

# Tell Node.js this is a production environemnt
ENV NODE_ENV=production

Expand Down
3 changes: 3 additions & 0 deletions node-playwright-firefox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ WORKDIR /home/myuser

ENV PLAYWRIGHT_BROWSERS_PATH=/home/myuser/pw-browsers

# Tell the crawlee cli that we already have browers installed, so it skips installing them
ENV CRAWLEE_SKIP_BROWSER_INSTALL=1

# Copy source code and xvfb script
COPY --chown=myuser:myuser package.json main.js firefox_test.js start_xvfb_and_run_cmd.sh /home/myuser/

Expand Down
3 changes: 3 additions & 0 deletions node-playwright-webkit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ WORKDIR /home/myuser

ENV PLAYWRIGHT_BROWSERS_PATH=/home/myuser/pw-browsers

# Tell the crawlee cli that we already have browers installed, so it skips installing them
ENV CRAWLEE_SKIP_BROWSER_INSTALL=1

# Copy source code and xvfb script
COPY --chown=myuser:myuser package.json main.js webkit_test.js start_xvfb_and_run_cmd.sh /home/myuser/

Expand Down
3 changes: 3 additions & 0 deletions node-playwright/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ WORKDIR /home/myuser
# Point playwright to the preincluded browsers - moving browsers around increases the image size a *lot*
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright

# Tell the crawlee cli that we already have browers installed, so it skips installing them
ENV CRAWLEE_SKIP_BROWSER_INSTALL=1

# Copy source code and xvfb script
COPY --chown=myuser:myuser package.json main.js chrome_test.js start_xvfb_and_run_cmd.sh /home/myuser/

Expand Down
3 changes: 3 additions & 0 deletions node-puppeteer-chrome/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ COPY --chown=myuser:myuser package.json main.js puppeteer_*.js start_xvfb_and_ru
# Sets path to Chrome executable, this is used by Apify.launchPuppeteer()
ENV APIFY_CHROME_EXECUTABLE_PATH=/usr/bin/google-chrome

# Tell the crawlee cli that we already have browers installed, so it skips installing them
ENV CRAWLEE_SKIP_BROWSER_INSTALL=1

# Tell Node.js this is a production environemnt
ENV NODE_ENV=production

Expand Down

0 comments on commit 5528fdd

Please sign in to comment.