mlops, devops
nginx proxy_pass에서 host의 ip 사용할 때
sonnson
2022. 1. 24. 14:48
port를 사용해 내부에서 서비스를 나누고, nginx로 접근할 때
host.docker.internal 을 사용
server {
server_name _;
listen 80;
location / {
proxy_pass http://host.docker.internal:5000;
}
}
localhost에서는 되는데, 서버에서는 안될때
docker에 --add-host=host.docker.internal:host-gateway 옵션을 줌