-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
template nginx.tmpl error : nil pointer evaluating interface {}.Networks #2189
Comments
The network in your compose is So the containers cannot reach eachother. That is probably why it is giving a nil pointers as there are zero (nil) available networks. |
Thanks for your response. The network |
Yes sorry, you are right. I missed the name part. I narrowed it down to commit bcec2d9075c053b9930de52a32a712d69961a213 if that helps @rhansen If you need a quick fix, you could use the nginx.tmpl from the commit before that. |
Thanks for your response. It works, thanks. I let you decide when you want to close the issue. |
For information, I changed line 13 in nginx.tmpl by With this change the actual template works. |
I think I understand what's going wrong. I don't think the commit @SchoNie identified is wrong; instead, I think that it exposed nginx-proxy/docker-gen#458 in certain setups where that bug wasn't exposed before. Specifically, if there are no containers with As a workaround, I believe it would be sufficient to remove |
Yes for me it already works, with the copied config from @genestouxguy |
Sorry I didn't get enough time today to try. I try monday. Have a nice weekend. |
Hi, It works also for me. Thanks. |
Hello,
I got the following error:
Template error: template: nginx.tmpl:24:39: executing "nginx.tmpl" at <$globals.CurrentContainer.Networks>: nil pointer evaluating interface {}.Networks
The nginx.tmpl is https://github.com/nginx-proxy/nginx-proxy/blob/main/nginx.tmpl
my docker-compose.yml is :
And I run the following container :
docker run --env VIRTUAL_HOST=test.example.com --env VIRTUAL_PORT=8000 --env LETSENCRYPT_HOST=test.example.com --env WWW='no-www' --network=net-proxy jwilder/whoami
Could you tell me why this error please ?
The text was updated successfully, but these errors were encountered: