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: Enable to add docker instance via socket on mac with apple silicon #6328

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

lazydan
Copy link
Contributor

@lazydan lazydan commented Aug 11, 2023

Enable to add docker instance via socket on mac with apple silicon.

#6326

@neilcsmith-net
Copy link
Member

Is there a reason to keep the architecture check in here? It's either relevant or it isn't! What architecture and OS set is actually supported by the underlying implementation here?

@lazydan
Copy link
Contributor Author

lazydan commented Aug 11, 2023

Is there a reason to keep the architecture check in here? It's either relevant or it isn't! What architecture and OS set is actually supported by the underlying implementation here?

My device is macbook with apple silicon. And the Apple Silicon M1 (or M2) chip is an AArch64 architecture.
After the request, my netbeans support to add a Unix Socket docker instance and work fine.
Snipaste_2023-08-11_17-12-37

@mbien mbien added the Docker label Aug 11, 2023
@mbien mbien linked an issue Aug 11, 2023 that may be closed by this pull request
@mbien mbien added this to the NB20 milestone Aug 11, 2023
@matthiasblaesing
Copy link
Contributor

I suspect that the architecture and OS check is in place to only offer unix domain sockets on systems where junixsocket can work. If this is agreed on, I suggest to update DockerSupport#isSocketSupported to read:

    public boolean isSocketSupported() {
        return AFUNIXSocket.isSupported();
    }

Then all supported architectures will get this (Windows, Linux, mac OS, the various BSDs on aarch64, amd64, arm, ppc64, riscv64).

@lazydan lazydan force-pushed the fix-add-socket-docker branch from bc84ebf to c5e53af Compare August 15, 2023 00:27
@mbien
Copy link
Member

mbien commented Aug 15, 2023

https://patch-diff.githubusercontent.com/raw/apache/netbeans/pull/6328.patch we would need the full name in the commit author field.

Also, please squash all commits into one and force push, thanks!

@lazydan lazydan force-pushed the fix-add-socket-docker branch from c5e53af to 074c8a7 Compare August 15, 2023 01:44
Use AFUNIXSocket.isSupported() to check the socket support
@lazydan lazydan force-pushed the fix-add-socket-docker branch from 89cea3a to 17e30ba Compare August 15, 2023 02:49
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

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

thanks. looks good.

Copy link
Member

@neilcsmith-net neilcsmith-net left a comment

Choose a reason for hiding this comment

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

Thanks! Haven't tested, but this is what my previous comment was suggesting to look for.

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Tested this successfully on linux and reviewed. I'll merge.

@lazydan Thank you for your contribution. For the future: You don't need to open an issue if you intent to open a PR immediately.
@mbien thanks for the hint about the "patch" view, it is handy, I just hope I can remember ;-)

@matthiasblaesing matthiasblaesing merged commit faef738 into apache:master Aug 15, 2023
@mbien
Copy link
Member

mbien commented Aug 15, 2023

thanks for the hint about the "patch" view, it is handy, I just hope I can remember ;-)

@matthiasblaesing agreed, sometimes very useful. Both .diff and .patch works, can be simply added to the PR url and it is generated for you.

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.

Unable to add a docker instance via socket on macos (Apple Silicon)
4 participants