Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
32 lines (28 sloc) 1.03 KB
package de.luckydonald.utils.dockerus;
import com.spotify.docker.client.DockerCertificateException;
import com.spotify.docker.client.DockerException;
/**
* Created by luckydonald on 17.10.16.
*/
public class DockerusAuto extends Dockerus {
DockerusAuto() throws DockerCertificateException {
//
}
private static Dockerus instance;
static public Dockerus getInstance() {
if (DockerusAuto.instance == null) {
try {
DockerusAuto.instance = Dockerus.getInstance();
DockerusAuto.instance.me();
} catch (DockerCertificateException | InterruptedException | DockerException e) {
try {
DockerusAuto.instance = DockerusDummy.getInstance();
} catch (DockerCertificateException e1) {
System.err.println("LOL THIS SHOULDN'T FAIL BECAUSE FAILING IS NOT IMPLEMENTED!!!111");
e1.printStackTrace();
}
}
}
return DockerusAuto.instance;
}
}
You can’t perform that action at this time.