Compare commits

...

14 Commits

Author SHA1 Message Date
8f5678502d 1.0.87 2019-11-19 18:42:16 +00:00
959d7aaed1 fix(core): update 2019-11-19 18:42:15 +00:00
5aa10653b6 1.0.86 2019-10-05 15:59:37 +02:00
e120d6527e fix(core): update 2019-10-05 15:59:36 +02:00
c80da05fbb 1.0.85 2019-10-05 15:56:49 +02:00
b9c3475b86 fix(core): update 2019-10-05 15:56:46 +02:00
de2d7e647b 1.0.84 2019-09-24 20:20:37 +02:00
d9348bd016 fix(Image().getVersion()): now returns 0.0.0 for unavailable versions to make SemVer work later on 2019-09-24 20:20:37 +02:00
034fbc3994 1.0.83 2019-09-23 13:52:52 +02:00
a33a6a1f7f fix(core): update 2019-09-23 13:52:52 +02:00
9dd403821b 1.0.82 2019-09-23 13:41:06 +02:00
601d82ea74 fix(core): update 2019-09-23 13:41:06 +02:00
784bb22511 1.0.81 2019-09-22 23:42:30 +02:00
71c89ac9bc fix(core): update 2019-09-22 23:42:29 +02:00
6 changed files with 40 additions and 8 deletions

9
.snyk Normal file
View File

@ -0,0 +1,9 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.13.5
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JS-HTTPSPROXYAGENT-469131:
- '@pushrocks/smartnetwork > speedtest-net > https-proxy-agent':
reason: None given
expires: '2019-11-04T13:59:28.695Z'
patch: {}

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@mojoio/docker", "name": "@mojoio/docker",
"version": "1.0.80", "version": "1.0.87",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@mojoio/docker", "name": "@mojoio/docker",
"version": "1.0.80", "version": "1.0.87",
"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",

View File

@ -140,7 +140,7 @@ export class DockerImage {
if (this.Labels && this.Labels.version) { if (this.Labels && this.Labels.version) {
return this.Labels.version; return this.Labels.version;
} else { } else {
return 'x.x.x'; return '0.0.0';
} }
} }
} }

View File

@ -30,7 +30,17 @@ export class DockerNetwork {
CheckDuplicate: true, CheckDuplicate: true,
Driver: 'overlay', Driver: 'overlay',
EnableIPv6: false, EnableIPv6: false,
Internal: true, /* IPAM: {
Driver: 'default',
Config: [
{
Subnet: `172.20.${networkCreationDescriptor.NetworkNumber}.0/16`,
IPRange: `172.20.${networkCreationDescriptor.NetworkNumber}.0/24`,
Gateway: `172.20.${networkCreationDescriptor.NetworkNumber}.11`
}
]
}, */
Internal: false,
Attachable: true, Attachable: true,
Ingress: false Ingress: false
}); });

View File

@ -113,8 +113,14 @@ export class DockerService {
} }
// lets configure limits // lets configure limits
const memoryLimitMB =
serviceCreationDescriptor.resources && serviceCreationDescriptor.resources.memorySizeMB
? serviceCreationDescriptor.resources.memorySizeMB
: 1000;
const limits = { const limits = {
MemoryBytes: 1000 * 1000000 MemoryBytes: memoryLimitMB * 1000000
}; };
if (serviceCreationDescriptor.resources) { if (serviceCreationDescriptor.resources) {
@ -128,10 +134,10 @@ export class DockerService {
Image: serviceCreationDescriptor.image.RepoTags[0], Image: serviceCreationDescriptor.image.RepoTags[0],
Labels: labels, Labels: labels,
Secrets: secretArray, Secrets: secretArray,
Mounts: mounts, Mounts: mounts
DNSConfig: { /* DNSConfig: {
Nameservers: ['1.1.1.1'] Nameservers: ['1.1.1.1']
} } */
}, },
UpdateConfig: { UpdateConfig: {
Parallelism: 0, Parallelism: 0,
@ -143,6 +149,13 @@ export class DockerService {
ForceUpdate: 1, ForceUpdate: 1,
Resources: { Resources: {
Limits: limits Limits: limits
},
LogDriver: {
Name: 'json-file',
Options: {
'max-file': '3',
'max-size': '10M'
}
} }
}, },
Labels: labels, Labels: labels,