fix(core): update
This commit is contained in:
@@ -4,6 +4,7 @@ import { DockerNetwork } from './classes.network.js';
|
||||
import { DockerService } from './classes.service.js';
|
||||
import { logger } from './logging.js';
|
||||
import path from 'path';
|
||||
import type { DockerImageStore } from './classes.imagestore.js';
|
||||
|
||||
export interface IAuthData {
|
||||
serveraddress: string;
|
||||
@@ -11,21 +12,27 @@ export interface IAuthData {
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface IDockerHostConstructorOptions {
|
||||
dockerSockPath?: string;
|
||||
imageStoreDir?: string;
|
||||
}
|
||||
|
||||
export class DockerHost {
|
||||
/**
|
||||
* the path where the docker sock can be found
|
||||
*/
|
||||
public socketPath: string;
|
||||
private registryToken: string = '';
|
||||
public imageStore: DockerImageStore;
|
||||
|
||||
/**
|
||||
* the constructor to instantiate a new docker sock instance
|
||||
* @param pathArg
|
||||
*/
|
||||
constructor(pathArg?: string) {
|
||||
constructor(optionsArg: IDockerHostConstructorOptions) {
|
||||
let pathToUse: string;
|
||||
if (pathArg) {
|
||||
pathToUse = pathArg;
|
||||
if (optionsArg.dockerSockPath) {
|
||||
pathToUse = optionsArg.dockerSockPath;
|
||||
} else if (process.env.DOCKER_HOST) {
|
||||
pathToUse = process.env.DOCKER_HOST;
|
||||
} else if (process.env.CI) {
|
||||
|
Reference in New Issue
Block a user