Skip to content

Pre-install browsers in docker container#3445

Merged
hassy merged 2 commits intoartilleryio:mainfrom
andrewvc:patch-1
Jan 13, 2025
Merged

Pre-install browsers in docker container#3445
hassy merged 2 commits intoartilleryio:mainfrom
andrewvc:patch-1

Conversation

@andrewvc
Copy link
Contributor

@andrewvc andrewvc commented Jan 9, 2025

The current docker container can't run playwright scripts since the required playwright browsers are missing, this PR fixes that by pre-installing them

Pre-merge checklist

This is for use by the Artillery team. Please leave this in if you're contributing to Artillery.

  • Does this require an update to the docs?
  • Does this require a changelog entry?

The current docker container can't run playwright scripts since the required playwright browsers are missing, this PR fixes that by pre-installing tem.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@hassy
Copy link
Member

hassy commented Jan 10, 2025

Thanks @andrewvc!

@hassy
Copy link
Member

hassy commented Jan 10, 2025

We'll need to make a couple of changes to the Dockerfile before shipping this:

  • Current Docker image is the plain Alpine-based Node.js image. It won't have the OS dependencies needed to run the browsers, so we'll need to install those. playwright install --with-deps will do it for us, but it expects an Ubuntu/Debian-based system, so:
    • We'll need to switch to using an Ubuntu/Debian-based Node.js image. 22-bookworm-slim should work.
  • Artillery's Playwright integration is limited to Chromium at the moment, so we don't need to install all default browsers. playwright install chromium will install just Chromium.

@hassy hassy merged commit becbe6f into artilleryio:main Jan 13, 2025
2 of 3 checks passed
@andrewvc
Copy link
Contributor Author

Thank you!

@andrewvc andrewvc deleted the patch-1 branch January 13, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants