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

Network errors on MacOS Sequoia as docker binary has no UUID #204814

Open
logopk opened this issue Jan 19, 2025 · 1 comment
Open

Network errors on MacOS Sequoia as docker binary has no UUID #204814

logopk opened this issue Jan 19, 2025 · 1 comment

Comments

@logopk
Copy link
Contributor

logopk commented Jan 19, 2025

I cannot run scripts with docker from the macOS 15 crontab (eg. for mysql data backups)

Sample Crontab:

* * * * * /bin/bash -lc "/opt/homebrew/bin/docker ps -a"

Mail from cron:

error during connect: Get "https://192.168.126.130:2376/v1.47/containers/json?all=1": dial tcp 192.168.126.130:2376: connect: no route to host

Message in console logs:

fehler	11:13:01.001853+0100	nehelper	+[NEProcessInfo copyUUIDsFromExecutable:]: failed to get UUID for Single Arch
fehler	11:13:01.001874+0100	nehelper	+[NEProcessInfo copyUUIDsForExecutable:]_block_invoke: failed to get UUIDs for /opt/homebrew/Cellar/docker/27.5.0/bin/docker

Apparently go binaries do not have a UUID. This is necessary to run eg docker from launchd or crontab.

▶ dwarfdump -u /opt/homebrew/Cellar/docker/27.5.0/bin/docker
returns empty

The error is tracked in golang golang/go#68678

The workaround is to build docker with modified ldflags (add -linkmode=external)

    ldflags = %W[
      -s -w
      -X github.com/docker/cli/cli/version.BuildTime=#{time.iso8601}
      -X github.com/docker/cli/cli/version.GitCommit=#{Utils.git_short_head}
      -X github.com/docker/cli/cli/version.Version=#{version}
      -X "github.com/docker/cli/cli/version.PlatformName=Docker Engine - Community"
      -linkmode=external
    ]

▶ dwarfdump -u /opt/homebrew/Cellar/docker/27.5.0/bin/docker
UUID: 290F92EA-B414-3A86-F70A-ED98203F4E7F (arm64) /opt/homebrew/Cellar/docker/27.5.0/bin/docker

After that docker can run and produce results for docker ps -a

@logopk logopk changed the title Network errors on MacOS Sequoia as binary has no UUID Network errors on MacOS Sequoia as docker binary has no UUID Jan 19, 2025
@daeho-ro
Copy link
Member

Is this issue related to below one?

It seems that the issue belongs to the upstream and will be fixed in the next release.

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

No branches or pull requests

2 participants