Skip to content

docker for mac compatibility  #537

@jeantil

Description

@jeantil

Hello,

I am beta testing docker 4 mac and when I disable docker-machine my test suite fails with

java.lang.UnsatisfiedLinkError: Could not find library in classpath, tried: [libjunixsocket-macosx-1.8-x86_64.dylib, libjunixsocket-macosx-1.5-x86_64.dylib]
    at org.newsclub.net.unix.NativeUnixSocket.load(NativeUnixSocket.java:81)
    at org.newsclub.net.unix.NativeUnixSocket.<clinit>(NativeUnixSocket.java:112)
    at org.newsclub.net.unix.AFUNIXSocket.<init>(AFUNIXSocket.java:36)
    at org.newsclub.net.unix.AFUNIXSocket.newInstance(AFUNIXSocket.java:50)
    at org.testcontainers.shaded.com.github.dockerjava.jaxrs.ApacheUnixSocket.<init>(ApacheUnixSocket.java:53)
    at org.testcontainers.shaded.com.github.dockerjava.jaxrs.UnixConnectionSocketFactory.createSocket(UnixConnectionSocketFactory.java:65)

The latest version of test containers (1.0.3 at the time of this writing) uses docker-java 2.2.0 (https://github.com/testcontainers/testcontainers-java/blob/2e227e29eded31c0b2d45a5351cc108994327394/core/pom.xml#L20) so I assume it is safe to say that docker-java 2.2.0 is not compatible with docker 4 mac. (I tried adding the dylib to my classpath and got further errors, also the compiled dylib seems hard to find and it feels very cumbersome to have to add it to the classpath manually).

I want to create a bug report to org.testcontainers asking them to upgrade docker-java to a docker4mac compatible version so I checked out the repository and tried to build master using only docker4mac.
I first got an error in com.github.dockerjava.client.DockerClientTest which seems to be the integration test. The error was that $HOME/.docker/certs did not exist. After creating that directory, I get the following output :

beforeTest(com.github.dockerjava.client.DockerClientTest)  Time elapsed: 2.359 sec  <<< FAILURE!
javax.ws.rs.ProcessingException: org.apache.http.conn.UnsupportedSchemeException: https protocol is not supported
    at com.github.dockerjava.client.DockerClientTest.beforeTest(DockerClientTest.java:32)
Caused by: org.apache.http.conn.UnsupportedSchemeException: https protocol is not supported
    at com.github.dockerjava.client.DockerClientTest.beforeTest(DockerClientTest.java:32)


Results :

Failed tests:
com.github.dockerjava.client.DockerClientTest.beforeTest(com.github.dockerjava.client.DockerClientTest)
  Run 1: DockerClientTest.beforeTest:32->AbstractDockerClientTest.beforeTest:60 » Processing
  Run 2: PASS
  Run 3: PASS
  Run 4: PASS
  Run 5: PASS
  Run 6: PASS
  Run 7: PASS
  Run 8: PASS
  Run 9: PASS
  Run 10: PASS
  Run 11: PASS
  Run 12: PASS
  Run 13: PASS
  Run 14: PASS
  Run 15: PASS
  Run 16: PASS
  Run 17: PASS
  Run 18: PASS
  Run 19: PASS
  Run 20: PASS
  Run 21: PASS
  Run 22: PASS
  Run 23: PASS
  Run 24: PASS
  Run 25: PASS
  Run 26: PASS
  Run 27: PASS
  Run 28: PASS
  Run 29: PASS
  Run 30: PASS
  Run 31: PASS
  Run 32: PASS
  Run 33: PASS
  Run 34: PASS
  Run 35: PASS
  Run 36: PASS
  Run 37: PASS
  Run 38: PASS
  Run 39: PASS
  Run 40: PASS
  Run 41: PASS
  Run 42: PASS
  Run 43: PASS
  Run 44: PASS
  Run 45: PASS
  Run 46: PASS
  Run 47: PASS
  Run 48: PASS
  Run 49: PASS
  Run 50: PASS
  Run 51: PASS
  Run 52: PASS
  Run 53: PASS
  Run 54: PASS
  Run 55: PASS
  Run 56: PASS
  Run 57: PASS
  Run 58: PASS
  Run 59: PASS
  Run 60: PASS
  Run 61: PASS
  Run 62: PASS
  Run 63: PASS
  Run 64: PASS
  Run 65: PASS
  Run 66: PASS
  Run 67: PASS
  Run 68: PASS
  Run 69: PASS
  Run 70: PASS
  Run 71: PASS
  Run 72: PASS
  Run 73: PASS
  Run 74: PASS
  Run 75: PASS
  Run 76: PASS
  Run 77: PASS
  Run 78: PASS
  Run 79: PASS
  Run 80: PASS
  Run 81: PASS
  Run 82: PASS
  Run 83: PASS
  Run 84: PASS
  Run 85: PASS
  Run 86: PASS
  Run 87: PASS
  Run 88: PASS
  Run 89: PASS


Tests run: 462, Failures: 1, Errors: 0, Skipped: 458

And I am unsure what to conclude, the test failure seems to suggest that the lastest master is not docker4mac compatible either but a single failed test seems surprising ...

Can you help me troubleshoot or maybe you already know if master is compatible with docker4mac ...

Thanks for your help
jean

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions