Closed AndyLau223 closed 2 years ago
Hello Andy and thanks for reporting the issue!
The codebase of the book does not support running on Apple silicon, e.g. M1, or ARM64 in general.
But I'm working on a number of blog posts where I explain how to upgrade the source code of the book to newer versions, for example to support ARM64 in general and specifically Apple silicon. The blog posts will be published in the README.md file.
When it comes to test-containers, you can simply upgrade the dependency to use v1.16.0 to make them work on M1, see the release notes.
Hope the helps, and let me know if it doesn't :-)
Regards, Magnus.
Hi Magnus, thanks for replying and the detailed explanation!
The solution of dependency upgrade works fine for me, and I've seen you publish a blog with regard to dependency upgrading, appreciate your efforts :-)
Best Regards, Andy
Hi dear author, I encountered an issue on the testing classes, belows are the fragment of error message:
o.t.d.DockerClientProviderStrategy : Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
'/Users/user/Library/Caches/JNA/temp/jna3778529952029307024.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e'))
I found there is issue on testcontainers repo Unable to run test containers with Apple Silicon Mac. The unit test works fine for me after adding
testImplementation 'net.java.dev.jna:jna-platform:5.8.0'
to gradle build file.