Skip to content
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

fix(release): Allow inbound connections to Zebra running in Docker #6755

Merged
merged 1 commit into from
May 24, 2023

Conversation

upbqdn
Copy link
Member

@upbqdn upbqdn commented May 24, 2023

Motivation & Solution

Binding 127.0.0.1 means that Zebra will accept inbound connections coming only from the loopback network interface. This is desirable as long as Zebra runs on a native machine.

When Zebra runs inside a Docker container, incoming connections coming from the host machine don't come from the container's loopback interface. In order to be able to connect to Zebra from the host machine, we can listen on 0.0.0.0 so Zebra accepts inbound connections coming from any interface. Users then can limit inbound connection to the loopback of their host by

docker run -p 127.0.0.1:8232:8232 zfnd/zebra:1.0.0-rc.8

We should maybe document this, although Docker operators should be familiar with it.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
    • Does it change concurrent code, unsafe code, or consensus rules?
  • How do you know it works? Does it have tests?

Binding `127.0.0.1` means that Zebra will accept inbound connections
coming only from the loopback network interface. This is desirable as
long as Zebra runs on a native machine.

When Zebra runs inside a Docker container, incoming connections coming
from the host machine don't come from the container's loopback
interface. In order to be able to connect to Zebra from the host
machine, we can listen on `0.0.0.0` so Zebra accepts inbound connections
coming from any interface. Users then can limit inbound connection to
the loopback of their host by

```bash
docker run -p 127.0.0.1:8232:8232 zfnd/zebra:1.0.0-rc.8
```
@upbqdn upbqdn added C-bug Category: This is a bug A-devops Area: Pipelines, CI/CD and Dockerfiles P-High 🔥 labels May 24, 2023
@upbqdn upbqdn requested a review from gustavovalverde May 24, 2023 14:44
@upbqdn upbqdn self-assigned this May 24, 2023
@upbqdn upbqdn requested a review from a team as a code owner May 24, 2023 14:44
@upbqdn upbqdn changed the title Allow inbound connections to Zebra in Docker fix(release): Allow inbound connections to Zebra in Docker May 24, 2023
@upbqdn upbqdn changed the title fix(release): Allow inbound connections to Zebra in Docker fix(release): Allow inbound connections to Zebra running in Docker May 24, 2023
Copy link
Member

@gustavovalverde gustavovalverde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking the time testing and fixing this!

@mergify mergify bot merged commit 5421447 into main May 24, 2023
@mergify mergify bot deleted the docker-stop-binding-loopback branch May 24, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants