mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
20 lines
444 B
TypeScript
20 lines
444 B
TypeScript
import Docker from 'dockerode';
|
|
|
|
export default class DockerSingleton extends Docker {
|
|
private static dockerInstance: DockerSingleton;
|
|
|
|
private constructor() {
|
|
super({
|
|
host: '192.168.1.56',
|
|
port: 2377,
|
|
});
|
|
}
|
|
|
|
public static getInstance(): DockerSingleton {
|
|
if (!DockerSingleton.dockerInstance) {
|
|
DockerSingleton.dockerInstance = new DockerSingleton();
|
|
}
|
|
return DockerSingleton.dockerInstance;
|
|
}
|
|
}
|