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

Calling docker container chrome from another docker container #972

Closed
Tomichi opened this issue Nov 6, 2023 · 3 comments
Closed

Calling docker container chrome from another docker container #972

Tomichi opened this issue Nov 6, 2023 · 3 comments
Labels
bug When you are sure about it's a bug

Comments

@Tomichi
Copy link

Tomichi commented Nov 6, 2023

Rod Version: v0.114.3

Hi, I want report some tricky behavior.

I have two docker containers scrape and chrome,
when I want to connect to chrome container in scrape container via

connectURL := launcher.MustResolveURL("ws://chrome:9222")
browser := rod.New().ControlURL(connectURL).MustConnect()
page := browser.MustPage("https://google.com")

I get error dial tcp. When i replace chrome in launcher.MustResolveURL("ws://chrome:9222") into IP of docker container
it works.

But I dont want to do DNS lookup request for translate chrome.

Minimal example of broken code is here https://github.com/Tomichi/scrape
When I install ping into scrape repo and run command ping chrome i get correct IP.
Thank you for your help.

@Tomichi Tomichi added the question Questions related to rod label Nov 6, 2023
@ysmood ysmood added bug When you are sure about it's a bug and removed question Questions related to rod labels Nov 6, 2023
@ysmood ysmood closed this as completed in 167ecc0 Nov 6, 2023
@Tomichi Tomichi changed the title Calling docker contaoner chrome from another docker container Calling docker container chrome from another docker container Nov 6, 2023
@Tomichi
Copy link
Author

Tomichi commented Nov 6, 2023

Thanks @ysmood for solving

Copy link

github-actions bot commented Nov 6, 2023

Please add a valid Rod Version: v0.0.0 to your issue. Current version is v0.114.4

generated by check-issue

@ysmood
Copy link
Member

ysmood commented Nov 6, 2023

The fix is in v0.114.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug When you are sure about it's a bug
Projects
None yet
Development

No branches or pull requests

2 participants