Reputation: 340
I try to get the ip using:
$request->getClientIp()
Which returns:
172.30.0.1
instead of something like 210.110.98.180
Using this something like this in docker-compose
http:
build:
context: .
dockerfile: ./Dockerfile
volumes:
- "./:/var/www/http/"
ports:
- "80:80"
Upvotes: 1
Views: 851
Reputation: 340
Fixed it by adding it to a docker network.
http:
build:
context: .
dockerfile: ./Dockerfile
volumes:
- "./:/var/www/http/"
ports:
- "80:80"
networks:
- bridge2
networks:
bridge2:
external: true
Upvotes: 1