Skip to content

Instantly share code, notes, and snippets.

@kiview
Created August 21, 2025 13:56
Show Gist options
  • Select an option

  • Save kiview/03e5f76644dd22ffd090db7289244bec to your computer and use it in GitHub Desktop.

Select an option

Save kiview/03e5f76644dd22ffd090db7289244bec to your computer and use it in GitHub Desktop.
Making Docker Model Runner accessible on public network interfaces through a container proxy
docker run -d --name ml-proxy -p 8080:80 nginx:alpine sh -c '
echo "server {
listen 80;
location / {
proxy_pass http://model-runner.docker.internal:80;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
}
}" > /etc/nginx/conf.d/default.conf && nginx -g "daemon off;"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment