@nikitajs/docker
Advanced tools
Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.2
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.0.0-alpha.2](https://github.com/adaltas/node-nikita/compare/@nikitajs/docker@1.0.0-alpha.1...@nikitajs/docker@1.0.0-alpha.2) (2021-08-30) | ||
### Features | ||
* **docker:** schema migration ([b412769](https://github.com/adaltas/node-nikita/commit/b412769e632260545461a080643e209948e34170)) | ||
# [1.0.0-alpha.1](https://github.com/adaltas/node-nikita/compare/@nikitajs/docker@1.0.0-alpha.0...@nikitajs/docker@1.0.0-alpha.1) (2021-03-10) | ||
@@ -8,0 +19,0 @@ |
130
lib/build.js
@@ -78,3 +78,3 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Hooks | ||
var errors, handler, on_action, path, schema, utils, | ||
var definitions, errors, handler, on_action, path, utils, | ||
indexOf = [].indexOf; | ||
@@ -88,67 +88,69 @@ | ||
// ## Schema | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'build_arg': { | ||
oneOf: [ | ||
{ | ||
type: 'string' | ||
}, | ||
{ | ||
type: 'object', | ||
patternProperties: { | ||
'.*': { | ||
typeof: 'string' | ||
// ## Schema definitions | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'build_arg': { | ||
oneOf: [ | ||
{ | ||
type: 'string' | ||
}, | ||
{ | ||
type: 'object', | ||
patternProperties: { | ||
'.*': { | ||
typeof: 'string' | ||
} | ||
} | ||
} | ||
} | ||
], | ||
description: `Send arguments to the build, match the Docker native ARG command.` | ||
], | ||
description: `Send arguments to the build, match the Docker native ARG command.` | ||
}, | ||
'content': { | ||
type: 'string', | ||
description: `Content of the Docker file, required unless \`file\` is provided.` | ||
}, | ||
'cwd': { | ||
type: 'string', | ||
description: `Change the build working directory.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'file': { | ||
type: 'string', | ||
description: `Path to Dockerfile, required unless \`content\` is provided.` | ||
}, | ||
'force_rm': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Always remove intermediate containers during build.` | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name of the Docker image present in the registry.` | ||
}, | ||
'quiet': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Suppress the verbose output generated by the containers.` | ||
}, | ||
'rm': { | ||
type: 'boolean', | ||
default: true, | ||
description: `Remove intermediate containers after a successful build.` | ||
}, | ||
'no_cache': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Do not use cache when building the repository.` | ||
}, | ||
'tag': { | ||
type: 'string', | ||
description: `Tag of the Docker image, default to latest.` | ||
} | ||
}, | ||
'content': { | ||
type: 'string', | ||
description: `Content of the Docker file, required unless \`file\` is provided.` | ||
}, | ||
'cwd': { | ||
type: 'string', | ||
description: `Change the build working directory.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'file': { | ||
type: 'string', | ||
description: `Path to Dockerfile, required unless \`content\` is provided.` | ||
}, | ||
'force_rm': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Always remove intermediate containers during build.` | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name of the Docker image present in the registry.` | ||
}, | ||
'quiet': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Suppress the verbose output generated by the containers.` | ||
}, | ||
'rm': { | ||
type: 'boolean', | ||
default: true, | ||
description: `Remove intermediate containers after a successful build.` | ||
}, | ||
'no_cache': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Do not use cache when building the repository.` | ||
}, | ||
'tag': { | ||
type: 'string', | ||
description: `Tag of the Docker image, default to latest.` | ||
} | ||
}, | ||
required: ['image'] | ||
required: ['image'] | ||
} | ||
}; | ||
@@ -311,3 +313,3 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
}, | ||
@@ -314,0 +316,0 @@ hooks: { |
@@ -18,46 +18,48 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, path, schema, utils; | ||
// ## Schema definitions | ||
var definitions, handler, path, utils; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'content': { | ||
type: 'object', | ||
description: `The content of the docker-compose.yml to write if not exist.` | ||
}, | ||
'eof': { | ||
type: 'boolean', | ||
default: true, | ||
description: `Inherited from nikita.file use when writing docker-compose.yml file.` | ||
}, | ||
'backup': { | ||
type: ['string', 'boolean'], | ||
default: false, | ||
description: `Create a backup, append a provided string to the filename extension or | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'content': { | ||
type: 'object', | ||
description: `The content of the docker-compose.yml to write if not exist.` | ||
}, | ||
'eof': { | ||
type: 'boolean', | ||
default: true, | ||
description: `Inherited from nikita.file use when writing docker-compose.yml file.` | ||
}, | ||
'backup': { | ||
type: ['string', 'boolean'], | ||
default: false, | ||
description: `Create a backup, append a provided string to the filename extension or | ||
a timestamp if value is not a string, only apply if the target file | ||
exists and is modified.` | ||
}, | ||
'detached': { | ||
type: 'boolean', | ||
default: true, | ||
description: `Run containers in detached mode.` | ||
}, | ||
'force': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Force to re-create the containers if the config and image have not | ||
}, | ||
'detached': { | ||
type: 'boolean', | ||
default: true, | ||
description: `Run containers in detached mode.` | ||
}, | ||
'force': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Force to re-create the containers if the config and image have not | ||
changed.` | ||
}, | ||
'services': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Specify specific services to create.` | ||
}, | ||
'target': { | ||
type: 'string', | ||
description: `The docker-compose.yml absolute's file's path, required if no content | ||
'services': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Specify specific services to create.` | ||
}, | ||
'target': { | ||
type: 'string', | ||
description: `The docker-compose.yml absolute's file's path, required if no content | ||
is specified.` | ||
} | ||
} | ||
@@ -152,3 +154,3 @@ } | ||
metadata: { | ||
schema: schema | ||
definitions: definitions | ||
} | ||
@@ -155,0 +157,0 @@ }; |
@@ -36,21 +36,23 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, path, schema, utils; | ||
// ## Schema definitions | ||
var definitions, handler, path, utils; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'source': { | ||
type: 'string', | ||
description: `The path to upload or the container followed by the path to download.` | ||
}, | ||
'target': { | ||
type: 'string', | ||
description: `The path to download or the container followed by the path to upload.` | ||
} | ||
}, | ||
'source': { | ||
type: 'string', | ||
description: `The path to upload or the container followed by the path to download.` | ||
}, | ||
'target': { | ||
type: 'string', | ||
description: `The path to download or the container followed by the path to upload.` | ||
} | ||
}, | ||
required: ['source', 'target'] | ||
required: ['source', 'target'] | ||
} | ||
}; | ||
@@ -130,3 +132,3 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
@@ -133,0 +135,0 @@ }; |
@@ -27,36 +27,38 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'code_skipped': { | ||
type: 'array', | ||
items: { | ||
type: 'integer' | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'code_skipped': { | ||
type: 'array', | ||
items: { | ||
type: 'integer' | ||
}, | ||
description: `The exit code(s) to skip.` | ||
}, | ||
description: `The exit code(s) to skip.` | ||
}, | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'gid': { | ||
$ref: 'module://@nikitajs/core/lib/actions/fs/base/chown#/properties/uid' | ||
}, | ||
'service': { | ||
type: 'boolean', | ||
default: false, | ||
description: `If true, run container as a service, else run as a command, true by | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'gid': { | ||
$ref: 'module://@nikitajs/core/lib/actions/fs/base/chown#/definitions/config/properties/uid' | ||
}, | ||
'service': { | ||
type: 'boolean', | ||
default: false, | ||
description: `If true, run container as a service, else run as a command, true by | ||
default.` | ||
}, | ||
'uid': { | ||
$ref: 'module://@nikitajs/core/lib/actions/fs/base/chown#/definitions/config/properties/uid' | ||
} | ||
}, | ||
'uid': { | ||
$ref: 'module://@nikitajs/core/lib/actions/fs/base/chown#/properties/uid' | ||
} | ||
}, | ||
required: ['container', 'command'] | ||
required: ['container', 'command'] | ||
} | ||
}; | ||
@@ -99,4 +101,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -38,20 +38,22 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: ['array', 'string'], | ||
items: { | ||
type: 'string' | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: ['array', 'string'], | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Name/ID of the container (array of containers not yet implemented).` | ||
}, | ||
description: `Name/ID of the container (array of containers not yet implemented).` | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
} | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
} | ||
}, | ||
required: ['container'] | ||
required: ['container'] | ||
} | ||
}; | ||
@@ -79,4 +81,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -26,21 +26,23 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'signal': { | ||
type: ['integer', 'string'], | ||
description: `Use a specified signal. SIGKILL by default.` | ||
} | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'signal': { | ||
type: ['integer', 'string'], | ||
description: `Use a specified signal. SIGKILL by default.` | ||
} | ||
}, | ||
required: ['container'] | ||
required: ['container'] | ||
} | ||
}; | ||
@@ -66,4 +68,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -28,23 +28,25 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema, utils; | ||
// ## Schema definitions | ||
var definitions, handler, utils; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'checksum': { | ||
type: 'string', | ||
description: `If provided, will check if attached input archive to checksum already | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'checksum': { | ||
type: 'string', | ||
description: `If provided, will check if attached input archive to checksum already | ||
exist, not native to docker but implemented to get better performance.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'input': { | ||
type: 'string', | ||
description: `TAR archive file to read from.` | ||
}, | ||
'source': { | ||
type: 'string', | ||
description: `Alias for the "input" option.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'input': { | ||
type: 'string', | ||
description: `TAR archive file to read from.` | ||
}, | ||
'source': { | ||
type: 'string', | ||
description: `Alias for the "input" option.` | ||
} | ||
} | ||
@@ -176,3 +178,3 @@ } | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
@@ -179,0 +181,0 @@ }; |
@@ -17,22 +17,24 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema, utils; | ||
// ## Schema definitions | ||
var definitions, handler, utils; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'email': { | ||
type: 'string', | ||
description: `User email.` | ||
}, | ||
'password': { | ||
type: 'string', | ||
description: `User password.` | ||
}, | ||
'user': { | ||
type: 'string', | ||
description: `Username of the user.` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'email': { | ||
type: 'string', | ||
description: `User email.` | ||
}, | ||
'password': { | ||
type: 'string', | ||
description: `User password.` | ||
}, | ||
'user': { | ||
type: 'string', | ||
description: `Username of the user.` | ||
} | ||
} | ||
@@ -64,3 +66,3 @@ } | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
@@ -67,0 +69,0 @@ }; |
@@ -13,14 +13,16 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema, utils; | ||
// ## Schema definitions | ||
var definitions, handler, utils; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'registry': { | ||
type: 'string', | ||
description: `Address of the registry server, default to "https://index.docker.io/v1/".` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'registry': { | ||
type: 'string', | ||
description: `Address of the registry server, default to "https://index.docker.io/v1/".` | ||
} | ||
} | ||
@@ -52,3 +54,3 @@ } | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
@@ -55,0 +57,0 @@ }; |
@@ -22,17 +22,19 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
} | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
} | ||
}, | ||
required: ['container'] | ||
required: ['container'] | ||
} | ||
}; | ||
@@ -52,4 +54,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -26,23 +26,25 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'all': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Pull all tagged images in the repository.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name of an image or a repository to pull. It can contain \`tag\`.` | ||
}, | ||
'tag': { | ||
type: 'string', | ||
description: `Specific image tag within a repository to pull. Default to \`latest\`.` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'all': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Pull all tagged images in the repository.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name of an image or a repository to pull. It can contain \`tag\`.` | ||
}, | ||
'tag': { | ||
type: 'string', | ||
description: `Specific image tag within a repository to pull. Default to \`latest\`.` | ||
} | ||
} | ||
@@ -85,4 +87,4 @@ } | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -22,21 +22,23 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'timeout': { | ||
type: 'integer', | ||
description: `Seconds to wait for stop before killing it.` | ||
} | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'timeout': { | ||
type: 'integer', | ||
description: `Seconds to wait for stop before killing it.` | ||
} | ||
}, | ||
required: ['container'] | ||
required: ['container'] | ||
} | ||
}; | ||
@@ -56,4 +58,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -23,29 +23,31 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'link': { | ||
type: 'boolean', | ||
description: `Remove the specified link.` | ||
}, | ||
'volumes': { | ||
type: 'boolean', | ||
description: `Remove the volumes associated with the container.` | ||
}, | ||
'force': { | ||
type: 'boolean', | ||
description: `Force the removal of a running container (uses SIGKILL).` | ||
} | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'link': { | ||
type: 'boolean', | ||
description: `Remove the specified link.` | ||
}, | ||
'volumes': { | ||
type: 'boolean', | ||
description: `Remove the volumes associated with the container.` | ||
}, | ||
'force': { | ||
type: 'boolean', | ||
description: `Force the removal of a running container (uses SIGKILL).` | ||
} | ||
}, | ||
required: ['container'] | ||
required: ['container'] | ||
} | ||
}; | ||
@@ -91,4 +93,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
// Generated by CoffeeScript 2.5.1 | ||
// # `nikita.docker_rmi` | ||
// # `nikita.docker.rmi` | ||
@@ -14,39 +14,33 @@ // Remove images. All container using image should be stopped to delete it unless | ||
// ## Hook | ||
var handler, on_action, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
on_action = function({config, metadata}) { | ||
if (metadata.argument != null) { | ||
return config.image = metadata.argument; | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'cwd': { | ||
type: 'string', | ||
description: `Change the build working directory.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name of the Docker image present in the registry.` | ||
}, | ||
'no_prune': { | ||
type: 'boolean', | ||
description: `Do not delete untagged parents.` | ||
}, | ||
'tag': { | ||
type: 'string', | ||
description: `Tag of the Docker image, default to latest.` | ||
} | ||
}, | ||
required: ['image'] | ||
} | ||
}; | ||
// ## Schema | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
// ...docker.wrap_schema | ||
'cwd': { | ||
type: 'string', | ||
description: `Change the build working directory.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name of the Docker image present in the registry.` | ||
}, | ||
'no_prune': { | ||
type: 'boolean', | ||
description: `Do not delete untagged parents.` | ||
}, | ||
'tag': { | ||
type: 'string', | ||
description: `Tag of the Docker image, default to latest.` | ||
} | ||
}, | ||
required: ['image'] | ||
}; | ||
// ## Handler | ||
@@ -80,9 +74,7 @@ handler = async function({config}) { | ||
handler: handler, | ||
hooks: { | ||
on_action: on_action | ||
}, | ||
metadata: { | ||
argument_to_config: 'image', | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
342
lib/run.js
@@ -30,3 +30,3 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Hooks | ||
var handler, on_action, schema; | ||
var definitions, handler, on_action; | ||
@@ -44,187 +44,189 @@ on_action = function({config}) { | ||
// ## Schema | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'add_host': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
// ## Schema definitions | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'add_host': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Add a custom host-to-IP mapping (host:ip) in the form of \`host:ip\`.` | ||
}, | ||
description: `Add a custom host-to-IP mapping (host:ip) in the form of \`host:ip\`.` | ||
}, | ||
'blkio_weight': { | ||
type: 'integer', | ||
description: `Block IO (relative weight), between 10 and 1000.` | ||
}, | ||
'cap_add': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'blkio_weight': { | ||
type: 'integer', | ||
description: `Block IO (relative weight), between 10 and 1000.` | ||
}, | ||
description: `Add Linux Capabilities.` | ||
}, | ||
'cap_drop': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'cap_add': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Add Linux Capabilities.` | ||
}, | ||
description: `Drop Linux Capabilities.` | ||
}, | ||
'cgroup_parent': { | ||
type: 'string', | ||
description: `Optional parent cgroup for the container.` | ||
}, | ||
'cid_file': { | ||
type: 'string', | ||
description: `Write the container ID to the file.` | ||
}, | ||
'container': { | ||
type: 'string', | ||
description: `Alias of name.` | ||
}, | ||
'cpuset_cpus': { | ||
type: 'string', | ||
description: `CPUs in which to allow execution (ex: 0-3 0,1 ...).` | ||
}, | ||
'cwd': { | ||
type: 'string', | ||
description: `Working directory of container.` | ||
}, | ||
'detach': { | ||
type: 'boolean', | ||
description: `if true, run container in background.` | ||
}, | ||
'device': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'cap_drop': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Drop Linux Capabilities.` | ||
}, | ||
description: `Send host device(s) to container.` | ||
}, | ||
'dns': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'cgroup_parent': { | ||
type: 'string', | ||
description: `Optional parent cgroup for the container.` | ||
}, | ||
description: `Set custom DNS server(s).` | ||
}, | ||
'dns_search': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'cid_file': { | ||
type: 'string', | ||
description: `Write the container ID to the file.` | ||
}, | ||
description: `Set custom DNS search domain(s).` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'entrypoint': { | ||
type: 'string', | ||
description: `Overwrite the default ENTRYPOINT of the image, equivalent to | ||
'container': { | ||
type: 'string', | ||
description: `Alias of name.` | ||
}, | ||
'cpuset_cpus': { | ||
type: 'string', | ||
description: `CPUs in which to allow execution (ex: 0-3 0,1 ...).` | ||
}, | ||
'cwd': { | ||
type: 'string', | ||
description: `Working directory of container.` | ||
}, | ||
'detach': { | ||
type: 'boolean', | ||
description: `if true, run container in background.` | ||
}, | ||
'device': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Send host device(s) to container.` | ||
}, | ||
'dns': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Set custom DNS server(s).` | ||
}, | ||
'dns_search': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Set custom DNS search domain(s).` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'entrypoint': { | ||
type: 'string', | ||
description: `Overwrite the default ENTRYPOINT of the image, equivalent to | ||
\`--entrypoint docker parameter\`` | ||
}, | ||
'env': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Environment variables for the container in the form of \`VAR=value\`.` | ||
}, | ||
'env_file': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'env': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Environment variables for the container in the form of \`VAR=value\`.` | ||
}, | ||
description: `Read in a file of environment variables.` | ||
}, | ||
'expose': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'env_file': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Read in a file of environment variables.` | ||
}, | ||
description: `Export port(s).` | ||
}, | ||
'hostname': { | ||
type: 'string', | ||
description: `Hostname in the docker container.` | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name/ID of base image.` | ||
}, | ||
'ipc': { | ||
type: 'string', | ||
description: `IPC namespace to use.` | ||
}, | ||
'label': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'expose': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Export port(s).` | ||
}, | ||
description: `Set meta data on a container.` | ||
}, | ||
'label_file': { | ||
type: 'string', | ||
description: `Path to read in a line delimited file of labels.` | ||
}, | ||
'link': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'hostname': { | ||
type: 'string', | ||
description: `Hostname in the docker container.` | ||
}, | ||
description: `Link to other container(s) in the form of a container name or a | ||
'image': { | ||
type: 'string', | ||
description: `Name/ID of base image.` | ||
}, | ||
'ipc': { | ||
type: 'string', | ||
description: `IPC namespace to use.` | ||
}, | ||
'label': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Set meta data on a container.` | ||
}, | ||
'label_file': { | ||
type: 'string', | ||
description: `Path to read in a line delimited file of labels.` | ||
}, | ||
'link': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Link to other container(s) in the form of a container name or a | ||
container ID.` | ||
}, | ||
'name': { | ||
type: 'string', | ||
description: `Assign a name to the container to run.` | ||
}, | ||
'net': { | ||
type: 'string', | ||
description: `Set the Network mode for the container.` | ||
}, | ||
'port': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Port mapping in the form of \`int:int\`.` | ||
}, | ||
'pid': { | ||
type: 'string', | ||
description: `PID namespace to use.` | ||
}, | ||
'publish_all': { | ||
type: 'boolean', | ||
description: `Publish all exposed ports to random ports.` | ||
}, | ||
'rm': { | ||
type: 'boolean', | ||
default: true, | ||
description: `Delete the container when it ends. True by default.` | ||
}, | ||
'ulimit': { | ||
type: 'array', | ||
items: { | ||
type: ['integer', 'string'] | ||
'name': { | ||
type: 'string', | ||
description: `Assign a name to the container to run.` | ||
}, | ||
description: `Ulimit options.` | ||
}, | ||
'volume': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'net': { | ||
type: 'string', | ||
description: `Set the Network mode for the container.` | ||
}, | ||
description: `Volume mapping, in the form of \`path:path\`.` | ||
'port': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Port mapping in the form of \`int:int\`.` | ||
}, | ||
'pid': { | ||
type: 'string', | ||
description: `PID namespace to use.` | ||
}, | ||
'publish_all': { | ||
type: 'boolean', | ||
description: `Publish all exposed ports to random ports.` | ||
}, | ||
'rm': { | ||
type: 'boolean', | ||
default: true, | ||
description: `Delete the container when it ends. True by default.` | ||
}, | ||
'ulimit': { | ||
type: 'array', | ||
items: { | ||
type: ['integer', 'string'] | ||
}, | ||
description: `Ulimit options.` | ||
}, | ||
'volume': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Volume mapping, in the form of \`path:path\`.` | ||
}, | ||
'volumes_from': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Mount volumes from the specified container(s).` | ||
} | ||
}, | ||
'volumes_from': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Mount volumes from the specified container(s).` | ||
} | ||
}, | ||
required: ['image'] | ||
required: ['image'] | ||
} | ||
}; | ||
@@ -367,4 +369,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -28,3 +28,3 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Hooks | ||
var handler, on_action, schema; | ||
var definitions, handler, on_action; | ||
@@ -35,27 +35,29 @@ on_action = function({config}) { | ||
// ## Schema | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
// ## Schema definitions | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name/ID of base image.` | ||
}, | ||
'tag': { | ||
type: 'string', | ||
description: `Tag of the image.` | ||
}, | ||
'output': { | ||
type: 'string', | ||
description: `TAR archive output path.` | ||
}, | ||
'target': { | ||
type: 'string', | ||
description: `Shortcut for "output" option, required.` | ||
} | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name/ID of base image.` | ||
}, | ||
'tag': { | ||
type: 'string', | ||
description: `Tag of the image.` | ||
}, | ||
'output': { | ||
type: 'string', | ||
description: `TAR archive output path.` | ||
}, | ||
'target': { | ||
type: 'string', | ||
description: `Shortcut for "output" option, required.` | ||
} | ||
}, | ||
required: ['image', 'output'] | ||
required: ['image', 'output'] | ||
} | ||
}; | ||
@@ -86,4 +88,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -27,22 +27,24 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'attach': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Attach STDOUT/STDERR.` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'attach': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Attach STDOUT/STDERR.` | ||
}, | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container, required.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
} | ||
}, | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container, required.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
} | ||
}, | ||
required: ['container'] | ||
required: ['container'] | ||
} | ||
}; | ||
@@ -83,4 +85,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -22,22 +22,24 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'timeout': { | ||
type: 'integer', | ||
description: `Seconds to wait for stop before killing the container (Docker default | ||
is 10).` | ||
} | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'timeout': { | ||
type: 'integer', | ||
description: `Seconds to wait for stop before killing the container (Docker default | ||
is 10).` | ||
} | ||
}, | ||
required: ['container'] | ||
required: ['container'] | ||
} | ||
}; | ||
@@ -79,4 +81,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -17,3 +17,3 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Hooks | ||
var handler, on_action, schema; | ||
var definitions, handler, on_action; | ||
@@ -26,27 +26,23 @@ on_action = function({config}) { | ||
// ## Schema | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'cwd': { | ||
type: 'string', | ||
description: `Change the build working directory.` | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name of the Docker image present in the registry.` | ||
}, | ||
'tag': { | ||
type: 'string', | ||
default: 'latest', | ||
description: `Tag of the Docker image, default to latest.` | ||
}, | ||
'boot2docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/boot2docker' | ||
}, | ||
'compose': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/compose' | ||
}, | ||
'machine': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/machine' | ||
// ## Schema definitions | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'cwd': { | ||
type: 'string', | ||
description: `Change the build working directory.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'image': { | ||
type: 'string', | ||
description: `Name of the Docker image present in the registry.` | ||
}, | ||
'tag': { | ||
type: 'string', | ||
default: 'latest', | ||
description: `Tag of the Docker image, default to latest.` | ||
} | ||
} | ||
@@ -108,4 +104,4 @@ } | ||
metadata: { | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -6,88 +6,94 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, i, len, property, ref, schema, utils; | ||
// ## Schema definitions | ||
var definitions, handler, utils; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'boot2docker': { | ||
$ref: '#/properties/docker/properties/boot2docker' | ||
}, | ||
'compose': { | ||
$ref: '#/properties/docker/properties/compose' | ||
}, | ||
'machine': { | ||
$ref: '#/properties/docker/properties/machine' | ||
}, | ||
'bash': { | ||
type: ['boolean', 'string'], | ||
description: `Serialize the command into a file and execute it with bash.` | ||
}, | ||
// 'rootdir': | ||
// type: 'string' | ||
// description: """ | ||
// Path to the mount point corresponding to the root directory, required | ||
// if the "arch_chroot" option is activated. | ||
// """ | ||
'command': { | ||
oneOf: [ | ||
{ | ||
type: 'string' | ||
}, | ||
{ | ||
typeof: 'function' | ||
} | ||
], | ||
description: `String, Object or array; Command to execute. A value provided as a | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
allOf: [ | ||
{ | ||
$ref: '#/definitions/docker' | ||
}, | ||
{ | ||
properties: { | ||
'bash': { | ||
type: ['boolean', | ||
'string'], | ||
description: `Serialize the command into a file and execute it with bash.` | ||
}, | ||
'command': { | ||
oneOf: [ | ||
{ | ||
type: 'string' | ||
}, | ||
{ | ||
typeof: 'function' | ||
} | ||
], | ||
description: `String, Object or array; Command to execute. A value provided as a | ||
function is interpreted as an action and will be called by forwarding | ||
the config object. The result is the expected to be the command | ||
to execute.` | ||
}, | ||
'cwd': { | ||
type: 'string', | ||
description: `Current working directory from where to execute the command.` | ||
}, | ||
'code': { | ||
type: 'array', | ||
default: [0], | ||
items: { | ||
type: 'integer' | ||
}, | ||
description: `Expected code(s) returned by the command, int or array of int, default | ||
}, | ||
'cwd': { | ||
type: 'string', | ||
description: `Current working directory from where to execute the command.` | ||
}, | ||
'code': { | ||
type: 'array', | ||
default: [0], | ||
items: { | ||
type: 'integer' | ||
}, | ||
description: `Expected code(s) returned by the command, int or array of int, default | ||
to 0.` | ||
}, | ||
'docker': { | ||
type: 'object', | ||
properties: { | ||
'boot2docker': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Whether to use boot2docker or not.` | ||
}, | ||
'compose': { | ||
type: 'boolean', | ||
description: `Use the \`docker-compose\` command instead of \`docker\`.` | ||
}, | ||
'machine': { | ||
type: 'string', | ||
format: 'hostname', | ||
description: `Name of the docker-machine, required if using docker-machine.` | ||
}, | ||
'docker': { | ||
$ref: '#/definitions/docker' | ||
} | ||
} | ||
}, | ||
description: `Isolate all the parent configuration properties into a docker | ||
{ | ||
$ref: 'module://@nikitajs/core/lib/actions/execute' | ||
} | ||
], | ||
required: ['command'] | ||
}, | ||
// Note, we can't use additionalProperties properties with anyOf for now, | ||
// from the doc: "There are some proposals to address this in the next | ||
// version of the JSON schema specification." | ||
// additionalProperties: false | ||
'docker': { | ||
type: 'object', | ||
description: `Isolate all the parent configuration properties into a docker | ||
property, used when providing and cascading a docker configuration at | ||
a global scale.` | ||
a global scale.`, | ||
properties: { | ||
'boot2docker': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Whether to use boot2docker or not.` | ||
}, | ||
'compose': { | ||
type: 'boolean', | ||
description: `Use the \`docker-compose\` command instead of \`docker\`.` | ||
}, | ||
'machine': { | ||
type: 'string', | ||
format: 'hostname', | ||
description: `Name of the docker-machine, required if using docker-machine.` | ||
} | ||
} | ||
}, | ||
required: ['command'], | ||
additionalProperties: false | ||
} | ||
}; | ||
ref = ['code_skipped', 'dry', 'env', 'format', 'gid', 'stdin_log', 'stdout', 'stdout_return', 'stdout_log', 'stderr', 'stderr_return', 'stderr_log', 'sudo', 'target', 'trap', 'uid']; | ||
for (i = 0, len = ref.length; i < len; i++) { | ||
property = ref[i]; | ||
(schema.properties[`${property}`] = { | ||
$ref: `module://@nikitajs/core/lib/actions/execute#/properties/${property}` | ||
}); | ||
} | ||
// ( | ||
// schema.properties["#{property}"] = | ||
// $ref: "module://@nikitajs/core/lib/actions/execute#/properties/#{property}" | ||
// ) for property in [ | ||
// 'code_skipped', 'dry', 'env', 'format', 'gid', 'stdin_log', | ||
// 'stdout', 'stdout_return', 'stdout_log', | ||
// 'stderr', 'stderr_return', 'stderr_log', | ||
// 'sudo', 'target', 'trap', 'uid' | ||
// ] | ||
@@ -99,3 +105,3 @@ // ## Handler | ||
}) { | ||
var bin, err, k, option, opts, ref1, v, value; | ||
var bin, err, k, option, opts, ref, v, value; | ||
// Global config | ||
@@ -107,5 +113,5 @@ config.docker = (await find(function({ | ||
})); | ||
ref1 = config.docker; | ||
for (k in ref1) { | ||
v = ref1[k]; | ||
ref = config.docker; | ||
for (k in ref) { | ||
v = ref[k]; | ||
if (config[k] == null) { | ||
@@ -116,7 +122,7 @@ config[k] = v; | ||
opts = (function() { | ||
var j, len1, ref2, results; | ||
ref2 = utils[!config.compose ? 'options' : 'compose_options']; | ||
var i, len, ref1, results; | ||
ref1 = utils[!config.compose ? 'options' : 'compose_options']; | ||
results = []; | ||
for (j = 0, len1 = ref2.length; j < len1; j++) { | ||
option = ref2[j]; | ||
for (i = 0, len = ref1.length; i < len; i++) { | ||
option = ref1[i]; | ||
value = config[option]; | ||
@@ -178,7 +184,7 @@ if (value == null) { | ||
handler: handler, | ||
hooks: { | ||
on_action: require('@nikitajs/core/lib/actions/execute').hooks.on_action | ||
}, | ||
// hooks: | ||
// on_action: require('@nikitajs/core/lib/actions/execute').hooks.on_action | ||
metadata: { | ||
schema: schema | ||
argument_to_config: 'command', | ||
definitions: definitions | ||
} | ||
@@ -185,0 +191,0 @@ }; |
@@ -11,23 +11,25 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
allOf: [ | ||
{ | ||
properties: { | ||
'detach': { | ||
default: true | ||
}, | ||
'rm': { | ||
default: false | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
allOf: [ | ||
{ | ||
properties: { | ||
'detach': { | ||
default: true | ||
}, | ||
'rm': { | ||
default: false | ||
} | ||
} | ||
}, | ||
{ | ||
$ref: 'module://@nikitajs/docker/lib/run' | ||
} | ||
}, | ||
{ | ||
$ref: 'module://@nikitajs/docker/lib/run' | ||
} | ||
], | ||
required: ['container', 'image'] | ||
], | ||
required: ['container', 'image'] | ||
} | ||
}; | ||
@@ -69,4 +71,4 @@ | ||
metadata: { | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -26,26 +26,22 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Name or Id of the container.` | ||
}, | ||
description: `Name or Id of the container.` | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
} | ||
}, | ||
'boot2docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/boot2docker' | ||
}, | ||
'compose': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/compose' | ||
}, | ||
'machine': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/machine' | ||
} | ||
}, | ||
required: ['container'] | ||
required: ['container'] | ||
} | ||
}; | ||
@@ -83,4 +79,4 @@ | ||
metadata: { | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -22,17 +22,19 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
} | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
} | ||
}, | ||
required: ['container'] | ||
required: ['container'] | ||
} | ||
}; | ||
@@ -52,4 +54,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -85,21 +85,23 @@ // Generated by CoffeeScript 2.5.1 | ||
$${exe} ${opts} ${command}`; | ||
}, | ||
wrap_schema: { | ||
'boot2docker': { | ||
type: 'boolean', | ||
default: false, | ||
description: `Whether to use boot2docker or not.` | ||
}, | ||
'compose': { | ||
type: 'boolean', | ||
description: `Use the \`docker-compose\` command instead of \`docker\`.` | ||
}, | ||
'machine': { | ||
type: 'string', | ||
description: `Name of the docker-machine, required if using docker-machine.` | ||
} | ||
} | ||
}; | ||
// wrap_schema: | ||
// 'boot2docker': | ||
// type: 'boolean' | ||
// default: false | ||
// description: ''' | ||
// Whether to use boot2docker or not. | ||
// ''' | ||
// 'compose': | ||
// type: 'boolean' | ||
// description: ''' | ||
// Use the `docker-compose` command instead of `docker`. | ||
// ''' | ||
// 'machine': | ||
// type: 'string' | ||
// description: ''' | ||
// Name of the docker-machine, required if using docker-machine. | ||
// ''' | ||
// Reformat error message if any | ||
// TODO: rename this function as format_error |
@@ -22,32 +22,34 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'driver': { | ||
type: 'string', | ||
description: `Specify volume driver name.` | ||
}, | ||
'label': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
description: `Set metadata for a volume.` | ||
}, | ||
'name': { | ||
type: 'string', | ||
description: `Specify volume name.` | ||
}, | ||
'opt': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
'driver': { | ||
type: 'string', | ||
description: `Specify volume driver name.` | ||
}, | ||
description: `Set driver specific options.` | ||
'label': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Set metadata for a volume.` | ||
}, | ||
'name': { | ||
type: 'string', | ||
description: `Specify volume name.` | ||
}, | ||
'opt': { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
description: `Set driver specific options.` | ||
} | ||
} | ||
@@ -85,4 +87,4 @@ } | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -22,14 +22,16 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
}, | ||
'name': { | ||
type: 'string', | ||
description: `Specify volume name.` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
}, | ||
'name': { | ||
type: 'string', | ||
description: `Specify volume name.` | ||
} | ||
} | ||
@@ -57,4 +59,4 @@ } | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
@@ -22,17 +22,19 @@ // Generated by CoffeeScript 2.5.1 | ||
// ## Schema | ||
var handler, schema; | ||
// ## Schema definitions | ||
var definitions, handler; | ||
schema = { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
definitions = { | ||
config: { | ||
type: 'object', | ||
properties: { | ||
'container': { | ||
type: 'string', | ||
description: `Name/ID of the container.` | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/definitions/docker' | ||
} | ||
}, | ||
'docker': { | ||
$ref: 'module://@nikitajs/docker/lib/tools/execute#/properties/docker' | ||
} | ||
}, | ||
required: ['container'] | ||
required: ['container'] | ||
} | ||
}; | ||
@@ -51,4 +53,4 @@ | ||
global: 'docker', | ||
schema: schema | ||
definitions: definitions | ||
} | ||
}; |
{ | ||
"name": "@nikitajs/docker", | ||
"description": "Nikita docker actions.", | ||
"description": "Provides Nikita actions for various Docker operations.", | ||
"keywords": [ | ||
@@ -16,3 +16,3 @@ "nikita", | ||
], | ||
"version": "1.0.0-alpha.1", | ||
"version": "1.0.0-alpha.2", | ||
"author": "David Worms <david@adaltas.com>", | ||
@@ -46,11 +46,11 @@ "bugs": { | ||
"dependencies": { | ||
"@nikitajs/file": "^1.0.0-alpha.1" | ||
"@nikitajs/file": "^1.0.0-alpha.2" | ||
}, | ||
"peerDependencies": { | ||
"@nikitajs/core": "^1.0.0" | ||
"@nikitajs/core": "^1.0.0-alpha.1" | ||
}, | ||
"devDependencies": { | ||
"@nikitajs/network": "^1.0.0-alpha.1", | ||
"@nikitajs/network": "^1.0.0-alpha.2", | ||
"coffeescript": "^2.5.1", | ||
"mocha": "^8.3.1", | ||
"mocha": "^8.3.2", | ||
"mocha-they": "^0.1.2", | ||
@@ -94,3 +94,3 @@ "should": "^13.2.3" | ||
}, | ||
"gitHead": "86d25e2158736f77e88edae3f243fcaba1b0b8b2" | ||
"gitHead": "07c87a8ab6e733021d0e3722b3457e45a9ec9480" | ||
} |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
78330
32
2792
1
5