Skip to content

Please provide example of how to get rod-stream working inside a docker image #13

Description

@bob9

I have attempted to get this running inside a docker image with no success.

I would like to provide a rest api which will scrape a page. Then upload the video to a remote location.

I was trying to use ghcr.io/go-rod/rod as the base image. However i think the main issue is the lack of X system running. I have tried XVFB() with no luck any help here is also appreciated.

My current launcher looks like this.

	preferences := fmt.Sprintf(`{"download": {"dx/efault_directory": "%s"}}`, downloadDirectoryAbs)
		rodLauncher = rodstream.MustPrepareLauncher(rodstream.LauncherArgs{UserMode: false}).Preferences(preferences).Set("no-sandbox").HeadlessNew(true).Bin(path)

MustCreatePage is being called and I get this error "Failed to initialise stream for scraper video capture! Reason: videoCapturePage not created yet, call MustCreatePage" because if t.Type == proto.TargetTargetInfoTypeBackgroundPage && t.Title == "Video Streamer" { always fails to file the Video Streamer page .

Any help is appreciated.

If there was an example with a Dockerfile and a basic main.go I am sure I could get it going if it is at all possible.

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions