title: Passing host abstract domain socket to Docker container
body: <p>I'm trying to give a Docker container access to the CloudHSM client service on an EC2 instance via the CloudHSM Java API (i.e. this <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/java-library.html" rel="nofollow noreferrer">thingy</a>). Using the <code>lsof</code> command, it appears that the client service on the host uses what might be an abstract domain socket, since the output contains this sort of thing (note the @ at the front of the filename):</p>
  
  <pre><code>cloudhsm_ 1249 1271    hsmuser   26u     unix 0xSOMEHEX      0t0      13265 @/etc/cavium/daemon_socket1 type=STREAM
  </code></pre>
  
  <p>When I attempt to use the library inside the container, though, I'm seeing this error:</p>
  
  <pre><code>com.cavium.cfm2.CFM2Exception: A call to the API login failed with error code 40000040 : LIQUIDSECURITY: Daemon socket connection error
  </code></pre>
  
  <p>This indicates to me that that socket isn't available inside the container (which makes sense given that no ports or volumes are being shared with the container). However, since there does not appear to be a socket file to share via a volume, I don't see a way to get the daemon socket into the container. Any suggestions?</p>