private void initCertPath(String certPath) throws IOException {
            this.certPath = certPath != null ? certPath : System.getenv("DOCKER_CERT_PATH");
            // Try default locations as last resort
            if (this.certPath == null) {
                File dockerHome = new File(getUserHome() + "/.docker");
                if (dockerHome.isDirectory()) {
                    String[] entries = dockerHome.list(SuffixFileFilter.PEM_FILTER);
                    if (entries == null) {
                        throw new IOException("Can not read directory " + dockerHome + ". Please check file permissions.");
                    }
                    if (entries.length > 0) {
                        this.certPath = dockerHome.getAbsolutePath();
                    }
                }
            }
        }
Get the docker certificate location
<ol>
  <li>From &lt;certPath&gt; a given cert config argument</li>
  <li>From DOCKER_CERT_PATH environment variable</li>
  <li>Default to ${user.home}/.docker</li>
</ol>
@param certPath the configured certification path which is used directly if set
src/main/java/io/fabric8/maven/docker/access/DockerConnectionDetector.java