-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
May not be possible to run Dockerfile on Google Cloud Run #331
Comments
The batteries-included Unfortunately, Cloud Run doesn't make any guarantees about the port range it'll request, and, after trying myself, I can confirm that Cloud Run can set Given you're likely already re-tagging + publishing the browserless image to your own GCR registry, there's a quick fix: extend the FROM browserless/chrome:1-chrome-stable
USER root note: running as root isn't a particularly good idea, and Joel definitely opted to run the browserless server this way for a reason (see his blog post where he talks about sandboxing). that said, unlike browserless.io, you're probably not going to be operating a multi-tenant environment (I'm guessing?). so maybe this is an acceptable amount of risk for your particular use case. YMMV! |
Pretty much what @knksmith57 said: you'll likely need to run as a privileged user if the port assignments are less than 1024. Otherwise it'd be nice if they could specify a range? |
Thanks, @joelgriffith and @knksmith57! I'll try this out tonight and report back. I'll share my Dockerfile if it works well. 😄 |
Looks like websockets aren't really supported on Cloud Run |
Ah, right! They list the lack of support as a "Known Issue" which, I imagine, means that they plan to add support in the future. I'll close this for now and then circle back once they have support for it! Thanks again for digging into this. |
Yup, no worries. I did a test and their service took roughly 2-3 seconds to screenshot example.com with Chrome pre-started. Our usage-based cluster does it in roughly 600ms, and wo Chrome pre-started. I know others have complained about slow start times in GCP, so use caution if speed is necessary. |
Yeah, the Chrome built into Cloud Functions is sadly very slow. |
Hi! Thanks for this great resource.
I'm trying to run the Dockerfile on Google Cloud Run. One of the requirements of Cloud Run is:
The Browserless site suggests using
docker run -p 8080:3000
, but Cloud Run doesn't provide a way to do this kind of port mapping.Is there another way to do this? Or would this require a change to Browserless?
Thanks!
The text was updated successfully, but these errors were encountered: