Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
b5c4727bae | |||
b6f3fbf8a9 | |||
7241e7a8fd | |||
ae37148ece | |||
65c37bdd6f | |||
6acbe30e2e | |||
eb6f7889d0 | |||
e39da5fee9 | |||
b07628bb0b | |||
5815f9b202 |
@ -39,6 +39,8 @@ snyk:
|
|||||||
# ====================
|
# ====================
|
||||||
|
|
||||||
testLTS:
|
testLTS:
|
||||||
|
services:
|
||||||
|
- docker:18-dind
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
@ -48,7 +50,7 @@ testLTS:
|
|||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- priv
|
||||||
|
|
||||||
testBuild:
|
testBuild:
|
||||||
stage: test
|
stage: test
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mojoio/docker",
|
"name": "@mojoio/docker",
|
||||||
"version": "1.0.46",
|
"version": "1.0.51",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mojoio/docker",
|
"name": "@mojoio/docker",
|
||||||
"version": "1.0.46",
|
"version": "1.0.51",
|
||||||
"description": "easy communication with docker remote api from node, TypeScript ready",
|
"description": "easy communication with docker remote api from node, TypeScript ready",
|
||||||
"private": false,
|
"private": false,
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -12,8 +12,16 @@ export class DockerHost {
|
|||||||
* the constructor to instantiate a new docker sock instance
|
* the constructor to instantiate a new docker sock instance
|
||||||
* @param pathArg
|
* @param pathArg
|
||||||
*/
|
*/
|
||||||
constructor(pathArg: string = 'http://unix:/var/run/docker.sock:') {
|
constructor(pathArg?: string) {
|
||||||
this.socketPath = pathArg;
|
let pathToUse: string;
|
||||||
|
if (pathArg) {
|
||||||
|
pathToUse = pathArg;
|
||||||
|
} else if (process.env.CI) {
|
||||||
|
pathToUse = 'http://docker:2375/';
|
||||||
|
} else {
|
||||||
|
pathToUse = 'http://unix:/var/run/docker.sock:';
|
||||||
|
}
|
||||||
|
this.socketPath = pathToUse;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,14 +112,6 @@ export class DockerImage {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* returns a boolean wether the image has a upstream image
|
|
||||||
*/
|
|
||||||
public isUpstreamImage(): boolean {
|
|
||||||
// TODO: implement isUpastreamImage
|
|
||||||
return this.RepoTags.length > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public tagImage(newTag) {}
|
public tagImage(newTag) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,4 +56,8 @@ export class DockerService {
|
|||||||
this.dockerHost = dockerHostArg;
|
this.dockerHost = dockerHostArg;
|
||||||
Object.assign(this, serviceObject);
|
Object.assign(this, serviceObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update() {
|
||||||
|
// TODO: implemnt updating service
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user