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

Ace Link does not respect docker contexts #77

Open
florius0 opened this issue Dec 30, 2023 · 1 comment
Open

Ace Link does not respect docker contexts #77

florius0 opened this issue Dec 30, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@florius0
Copy link

RN docker socket is hardcoded:

let userSocketPath = home.path + "/.docker/run/docker.sock"

Which may work for some docker runtimes, tho is not guaranteed to work in the future, or with the default one.

Much better solution would be to fetch the socket URI from user's docker configuration using docker context inspect:

[
    {
        "Name": "orbstack",
        "Metadata": {
            "Description": "OrbStack"
        },
        "Endpoints": {
            "docker": {
                "Host": "unix:///Users/.../.orbstack/run/docker.sock",
                "SkipTLSVerify": false
            }
        },
        "TLSMaterial": {},
        "Storage": {
            "MetadataPath": "/Users/.../.docker/contexts/meta/2d89b732b01a00a2d1675ed3cee9fd0f965daadf90603c989dd3afd4569c6896",
            "TLSPath": "/Users/.../.docker/contexts/tls/2d89b732b01a00a2d1675ed3cee9fd0f965daadf90603c989dd3afd4569c6896"
        }
    }
]

The URI is at [0]Endpoints.docker.host.

Related issues

Solving the problem in the described way will also likely solve the following issues:

Temporary Workaround

At the moment, one could symlink socket of runtime of their choice to ~/.docker/run/docker.sock, i.e. ln -s /Users/.../.orbstack/run/docker.sock ~/.docker/run/docker.sock.

PS
I request @blaise-io to pin the issue until fix is implemented, as it contains workaround

@florius0 florius0 added the bug Something isn't working label Dec 30, 2023
@blaise-io
Copy link
Owner

Note to self for when I pick this up: docker context inspect --format '{{.Endpoints.docker.Host}}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants