-
Notifications
You must be signed in to change notification settings - Fork 317
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
How to access host port from selenoid docker browser container #201
Comments
Try to use host's eth0 (linux) or en0 (mac) ip address instead of 127.0.0.1 or localhost within container. |
I tried to use host's ip address, create alias |
I was able to access my mac's host interface from container:
```
$ ifconfig en0 | grep inet
inet6 fe80::c9e:b043:9ddc:533b%en0 prefixlen 64 secured scopeid 0x4
inet 192.168.1.33 netmask 0xffffff00 broadcast 192.168.1.255
```
```
$ docker run -it --rm ubuntu:16.04 /bin/bash
```
```
root@f171c702c8b7:/# ping 192.168.1.33
PING 192.168.1.33 (192.168.1.33) 56(84) bytes of data.
64 bytes from 192.168.1.33: icmp_seq=1 ttl=37 time=0.478 ms
64 bytes from 192.168.1.33: icmp_seq=2 ttl=37 time=0.184 ms
```
2017-08-30 0:21 GMT+03:00 Valentin Buryakov <notifications@github.com>:
… I tried to use host's ip address, create alias ifconfig lo0 alias
123.123.123.123/24 and even special Mac-only DNS name
docker.for.mac.localhost but couldn't get host inside container.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#201 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABWNbTyVyC__f35590QGMsT0saeBIQklks5sdIDdgaJpZM4PGICj>
.
|
Thx, it works and but the problem is that for auth purpose (which uses external API) i should use dns-name instead of certain IP, dev.my-company.com. So is that possible to add host for selenoid docker containers with browsers ? like -add-host=dev.my-company.com:${MY_IP} |
@valburyakov currently this is not supported. And according to moby/moby#23177 you can't specify this mapping in Docker daemon settings. Let us think a bit whether we could implement this. |
Ability to specify custom hosts entries per browser image (fixes #201)
@valburyakov you can try this by using |
This works. Closing. |
@vania-pooh Thx a lot for this feature. This is exactly what I needed. I appreciate it. |
@valburyakov this was released in Selenoid 1.3.6. So you can now use |
Hello, i wonder if there is a possibility how to map a host port to docker container in order to access application which runs locally on my host ? I didn't found any options how i can set --add-host option in selenoid browser docker images. Thanks in advance
The text was updated successfully, but these errors were encountered: