UNPKG

the-moby-effect

Version:
98 lines (97 loc) 4.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ContainerConfig = void 0; var Schema = _interopRequireWildcard(require("effect/Schema")); var MobySchemas = _interopRequireWildcard(require("../schemas/index.js")); var ContainerHealthConfig = _interopRequireWildcard(require("./ContainerHealthConfig.generated.js")); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } class ContainerConfig extends /*#__PURE__*/Schema.Class("ContainerConfig")({ /** Hostname */ Hostname: Schema.String, /** Domainname */ Domainname: Schema.String, /** * User that will run the command(s) inside the container, also support * user:group */ User: Schema.String, /** Attach the standard input, makes possible user interaction */ AttachStdin: Schema.Boolean, /** Attach the standard output */ AttachStdout: Schema.Boolean, /** Attach the standard error */ AttachStderr: Schema.Boolean, /** List of exposed ports */ ExposedPorts: /*#__PURE__*/Schema.optionalWith(MobySchemas.PortSchemas.PortSet, { nullable: true }), /** * Attach standard streams to a tty, including stdin if it is not * closed. */ Tty: Schema.Boolean, /** Open stdin */ OpenStdin: Schema.Boolean, /** If true, close stdin after the 1 attached client disconnects. */ StdinOnce: Schema.Boolean, /** List of environment variable to set in the container */ Env: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(Schema.String)), /** Command to run when starting the container */ Cmd: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(Schema.String)), /** Healthcheck describes how to check the container is healthy */ Healthcheck: /*#__PURE__*/Schema.optionalWith(ContainerHealthConfig.ContainerHealthConfig, { nullable: true }), /** * True if command is already escaped (meaning treat as a command line) * (Windows specific). */ ArgsEscaped: /*#__PURE__*/Schema.optional(Schema.Boolean), /** * Name of the image as it was passed by the operator (e.g. could be * symbolic) */ Image: Schema.String, /** List of volumes (mounts) used for the container */ Volumes: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Record({ key: Schema.String, value: Schema.Object })), /** Current directory (PWD) in the command will be launched */ WorkingDir: Schema.String, /** Entrypoint to run when starting the container */ Entrypoint: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(Schema.String)), /** Is network disabled */ NetworkDisabled: /*#__PURE__*/Schema.optional(Schema.Boolean), /** * Mac Address of the container. Deprecated: this field is deprecated * since API v1.44. Use EndpointSettings.MacAddress instead. */ MacAddress: /*#__PURE__*/Schema.optional(Schema.String), /** ONBUILD metadata that were defined on the image Dockerfile */ OnBuild: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Array(Schema.String)), /** List of labels set to this container */ Labels: /*#__PURE__*/Schema.NullOr(/*#__PURE__*/Schema.Record({ key: Schema.String, value: Schema.String })), /** Signal to stop a container */ StopSignal: /*#__PURE__*/Schema.optional(Schema.String), /** Timeout (in seconds) to stop a container */ StopTimeout: /*#__PURE__*/Schema.optionalWith(MobySchemas.Int64, { nullable: true }), /** Shell for shell-form of RUN, CMD, ENTRYPOINT */ Shell: /*#__PURE__*/Schema.optionalWith(/*#__PURE__*/Schema.Array(Schema.String), { nullable: true }) }, { identifier: "ContainerConfig", title: "container.Config", documentation: "https://github.com/moby/moby/blob/a21b1a2d12e2c01542cb191eb526d7bfad0641e3/api/types/container/config.go#L38-L73" }) {} exports.ContainerConfig = ContainerConfig; //# sourceMappingURL=ContainerConfig.generated.js.map