title: Expose SoftHSM library to the code running in host machine
body: <p>I am generating keypairs in SoftHSMv2 using the <a href="https://www.npmjs.com/package/node-webcrypto-p11" rel="nofollow noreferrer">node-webcrypto-p11</a> package that is installed locally on my computer. I want to setup a docker container for SoftHSM so that any developer can build the image and run the container using docker file in repo without having to go through the entire steps of building SoftHSM. </p>
  
  <p>I'm currently using this <a href="https://github.com/psmiraglia/docker-softhsm" rel="nofollow noreferrer">https://github.com/psmiraglia/docker-softhsm</a> to build image and run container for SoftHSM. But I'm not sure how can I access the library inside the container in my code. Currently I'm using the code given below. Is there a method I can access the library with in the container.
  NOTE: This is just to make the life of other developers not to be used for deployment. </p>
  
  <pre><code>import {
      Crypto
  } from 'node-webcrypto-p11';
  // Need to set the library path from container.
  // The given below path is for host machine.
  const crypto = new Crypto({
      library: "/usr/local/lib/softhsm/libsofthsm2.so",
      name: "SoftHSMv2",
      slot: 0,
      readWrite: true,
      pin: "0987654321",
  });
  </code></pre>