Compare commits

...

6 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
4 changed files with 26 additions and 4 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",
"version": "1.0.84",
"version": "1.0.87",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@mojoio/docker",
"version": "1.0.84",
"version": "1.0.87",
"description": "easy communication with docker remote api from node, TypeScript ready",
"private": false,
"main": "dist/index.js",

View File

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