Open
Description
I pull down this image and run as following comand:
docker run --name redirect -v ~/temp/nginx/www:/usr/share/nginx/html:ro -v ~/temp/nginx/nginx.conf:/etc/nginx/nginx.conf:ro -p 8888:80 10.20.132.153:5000/nginx
the nginx run well,
but when I check the access.log in /var/log/nginx/access.log, I found out that all the client ip($remote_addr) is the ip of docker0 bridge of the host.
I also try with this command but the issus is still.
# change -p 8888:80 to --net host
docker run --name redirect -v ~/temp/nginx/www:/usr/share/nginx/html:ro -v ~/temp/nginx/nginx.conf:/etc/nginx/nginx.conf:ro --net host 10.20.132.153:5000/nginx
Metadata
Metadata
Assignees
Labels
No labels