Merge branch 'dev' into HEAD

This commit is contained in:
ajnart committed 2023-04-03 15:40:47 +09:00
commit b2f04937b9
7 files changed
+74 -59

No files matched your search

+6 -1
View File
@@ -9,7 +9,12 @@ export default class DockerSingleton extends Docker {
public static getInstance(): DockerSingleton {
if (!DockerSingleton.dockerInstance) {
DockerSingleton.dockerInstance = new DockerSingleton();
DockerSingleton.dockerInstance = new Docker({
// If env variable DOCKER_HOST is not set, it will use the default socket
...(process.env.DOCKER_HOST && { host: process.env.DOCKER_HOST }),
// Same thing for docker port
...(process.env.DOCKER_PORT && { port: process.env.DOCKER_PORT }),
});
}
return DockerSingleton.dockerInstance;
}