Closed devXpro closed 1 year ago
Hi @devXpro,
you should define the LAN_NETWORK
parameter:
@ilteoood I already tried that and it didn't help.
version: '3'
services:
bot:
restart: always
build: .
chrome:
image: browserless/chrome
network_mode: service:surfshark
surfshark:
image: ilteoood/docker-surfshark
container_name: surfshark
environment:
- SURFSHARK_USER=$SURFSHARK_USER
- SURFSHARK_PASSWORD=$SURFSHARK_PASSWORD
- SURFSHARK_COUNTRY=es
- CONNECTION_TYPE=udp
- LAN_NETWORK=192.168.0.0/24
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
restart: unless-stopped
dns:
- 1.1.1.1
I go inside the bot container and run wget http://chrome
there, I get an error wget: bad address 'chrome'
that's because your browserless container is not anymore directly exposed to the network, as surfshark is acting like a proxy for it. You should, on the surfshark container, expose the port used by browserless (3000:3000 I guess), and then access it using the address the machine in which these are hosted.
You could also try accessing http://surfshark
, but I don't know if it could work
I just changed the host in the "bot" container from chrome
to surfshark
, and it worked! Thank you very much!
I have this config:
I want to access the host 'chrome' from the 'bot' container using the service name, but it's not working. How can I fix this?