Created
August 21, 2025 13:56
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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