Skip to content

Update Dockerfile #604

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

Open
wants to merge 2 commits into
base: latest
Choose a base branch
from
Open

Update Dockerfile #604

wants to merge 2 commits into from

Conversation

irctrakz
Copy link

Remove setuid for ping supporting older hosts (NAS) that don't have extended attributes.

♻️ Current situation

root@HomeNAS ~ # docker pull homebridge/homebridge:latest
latest: Pulling from homebridge/homebridge
0622fac788ed: Pull complete
70913027ecf4: Extracting [==================================================>] 223.5MB/223.5MB
06c8ff15a4f2: Download complete
726e97df8c02: Download complete
5555af05ef06: Download complete
63cccba96eec: Download complete
a99a466f3aad: Download complete
failed to register layer: lsetxattr security.capability /usr/bin/ping: operation not supported

💡 Proposed solution

Remove setuid, it's not required when the container has host networking.

⚙️ Release Notes

This is a bugfix and should have no impact

➕ Additional Information

If applicable, provide additional context in this section.

Testing

Which tests were added? Which existing tests were adapted/changed? Which situations are covered, and what edge cases are missing?

Reviewer Nudging

https://github.com/homebridge/docker-homebridge/blob/2025-05-16/Dockerfile#L37

Remove setuid for ping supporting older hosts (NAS) that don't have extended attributes.
@irctrakz irctrakz requested a review from NorthernMan54 as a code owner May 19, 2025 17:56
@NorthernMan54 NorthernMan54 requested a review from Copilot May 20, 2025 01:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Remove the setuid bit from the ping binary in the Docker image to avoid xattr errors on hosts lacking extended attribute support.

  • Change /bin/ping permissions from 4755 to 0755
  • Rely on host networking for ICMP functionality
Comments suppressed due to low confidence (1)

Dockerfile:37

  • There are no tests verifying that ping still functions without the setuid bit under host networking; consider adding an integration test to cover this use case.
&& chmod 0755 /bin/ping \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant