Chromium sandboxing failed
I run Crawlee in a docker container. That docker container is used in a Jenkins task.
When starting the crawler I receive the following error:
The full error log can be found in the attachment.
This error only occurs after upgrading
crawlee[playwright]
to 0.5.2
What are the advantages/disadvantages of launching Chromium without sandbox? How could I configure my environment to support sandboxing?5 Replies
Someone will reply to you shortly. In the meantime, this might help:
-# This post was marked as solved by ROYOSTI. View answer.
unwilling-turquoise•4mo ago
Hey @ROYOSTI
Using a sandbox is generally safer in terms of isolating processes.
Your error is probably related to the docker configuration.
Try either using the official playwright docker file as a base - https://playwright.dev/python/docs/docker.
Or update the configuration... possibly to use a separate user with appropriate permissions (playwright may not work when running as root user)
extended-salmonOP•4mo ago
Hi @Mantisus,
Thanks for the quick response!
I suck so hard at making docker files. So if I want to use the official docker file as base I probably need to alter my Dockerfile like this:
FROM mcr.microsoft.com/playwright/python:v1.49.1-noble
Do I somewhere need to use adduser
? And what about the seccomp profile?
What if I want to update my configuration manually by adding a separate user? Could you point me in the right direction on how to do so?
My docker file looks like this:
And I run it like this:
unwilling-turquoise•4mo ago
Try something like this.
I have this working locally without having to configure seccomp
extended-salmonOP•4mo ago
Thanks @Mantisus . This fixed my issue!
On my Jenkins instance (hosted on AWS EC2) I needed to add a seccomp as mentioned in the URL you shared, otherwise I would receive another error. Thanks for helping me!