Skip to content
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

Is there a docker image for puppeteer-dart? #161

Open
heliping opened this issue Dec 27, 2021 · 1 comment
Open

Is there a docker image for puppeteer-dart? #161

heliping opened this issue Dec 27, 2021 · 1 comment

Comments

@heliping
Copy link

When use in the linux by docker , I got a mistake like this?

ProcessException: No such file or directory
Command: unzip .local-chromium / 901912_chrome-linux.zip -d .local-chromium / 901912

Is there some images support the puppeteer-dart?

@xvrh
Copy link
Owner

xvrh commented Dec 28, 2021

In general you can follow the same guidance that for normal puppeteer: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-in-docker

To solve your error you should try to download chromium when you build the image.

ie:

FROM debian:buster

RUN  apt-get update \
     && apt-get install -y ... # All the dependencies recommanded to install Chromium

# ... Copy your files

# Download chromium
RUN dart pub get && dart bin/download_chromium.dart

# Create your entry point ...

And bin/download_chromium.dart is:

import 'package:puppeteer/puppeteer.dart';

void main() async {
  await downloadChrome();
}

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

No branches or pull requests

2 participants