fix(core): update

This commit is contained in:
Philipp Kunz 2024-02-02 16:55:51 +01:00
parent 440eb07afb
commit 001e870643
2 changed files with 5 additions and 2 deletions

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@apiclient.xyz/docker', name: '@apiclient.xyz/docker',
version: '1.0.107', version: '1.0.108',
description: 'easy communication with docker remote api from node, TypeScript ready' description: 'easy communication with docker remote api from node, TypeScript ready'
} }

View File

@ -34,7 +34,10 @@ export class DockerHost {
pathToUse = 'http://unix:/var/run/docker.sock:'; pathToUse = 'http://unix:/var/run/docker.sock:';
} }
if (pathToUse.startsWith('unix:///')) { if (pathToUse.startsWith('unix:///')) {
pathToUse = pathToUse.replace('unix://', 'http://unix:') + ':'; pathToUse = pathToUse.replace('unix://', 'http://unix:');
}
if (pathToUse.endsWith('.sock')) {
pathToUse = pathToUse.replace('.sock', '.sock:');
} }
console.log(`using docker sock at ${pathToUse}`); console.log(`using docker sock at ${pathToUse}`);
this.socketPath = pathToUse; this.socketPath = pathToUse;