Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/docker"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["docker","build"], { context: "<context>", tag: "<tag>" });
console.log(JSON.stringify(result));From the command line
$ mark docker build --context <string> --tag <string>
As data, in a program
{
"$proc": ["docker", "build"],
"input": { "context": "<context>", "tag": "<tag>" }
}JSON Schemas
{
"input": {
"type": "object",
"properties": {
"context": {
"type": "string",
"description": "Build context path"
},
"tag": {
"type": "string",
"description": "Image tag"
},
"dockerfile": {
"description": "Dockerfile path (relative to context)",
"type": "string"
},
"buildArgs": {
"description": "Build arguments",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
"noCache": {
"description": "Do not use cache when building",
"type": "boolean"
},
"cwd": {
"description": "Working directory",
"type": "string"
},
"timeout": {
"description": "Timeout in milliseconds",
"type": "number"
}
},
"required": [
"context",
"tag"
]
},
"output": {
"type": "object",
"properties": {
"exitCode": {
"type": "number",
"description": "The exit code of docker (0 is success)"
},
"stdout": {
"type": "string",
"description": "The standard output of docker"
},
"stderr": {
"type": "string",
"description": "The standard error of docker, or the error message when docker did not start"
},
"success": {
"type": "boolean",
"description": "True when the exit code is 0"
},
"duration": {
"type": "number",
"description": "The time of the command, in milliseconds"
}
},
"required": [
"exitCode",
"stdout",
"stderr",
"success",
"duration"
],
"additionalProperties": {}
}
}