question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bind 0.0.0.0 in docker env

See original GitHub issue

If you run a Fastify server in Docker by default it will run on the address 127.0.0.1 which is not reachable from outside. We can add an is docker check and if it is true, use 0.0.0.0 instead of 127.0.0.1.

What do you think?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ninjatuxcommented, Apr 9, 2018

it’s a sensible thing to do if by default we want a working service limiting options and arguments when running in docker

1reaction
mcollinacommented, May 27, 2020

I do not think you are running your server using fastify-cli. Are you using this module at all?

The snippet above is not from this module.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bind on 0.0.0.0 in docker containers · Issue #324 - GitHub
i.e. for docker and environments which require it, just setting the environment variable NEXUS_HOST=0.0.0.0 should be sufficient.
Read more >
Docker - Bind for 0.0.0.0:4000 failed: port is already allocated
You need to make sure that the previous container you launched is killed, before launching a new one that uses the same port....
Read more >
Explore networking features - Docker Documentation
Explore networking features. Docker Desktop provides several networking features to make it easier to use. Features for all platforms . VPN Passthrough...
Read more >
Build and run a Python app in a container - Visual Studio Code
To accomplish this binding, the final line in the Dockerfile says: CMD ["gunicorn", "--bind", "0.0.0.0:8000", "{workspace_folder_name}.wsgi"].
Read more >
Can't figure out how to bind to just 0.0.0.0:8087 rather than ...
1. Caddy version (caddy version): xcaddy build v2.4.6 --with github.com/baldinof/caddy-supervisor 2. How I run Caddy: Caddyfile and caddy ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found