@intentius/chant-lexicon-docker 0.124.22 → 0.124.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/codegen/generate.d.ts.map +1 -1
  2. package/dist/generated/index.d.ts +582 -6
  3. package/dist/generated/index.d.ts.map +1 -1
  4. package/dist/integrity.json +7 -7
  5. package/dist/lint/post-synth/cache-busting-copy.d.ts.map +1 -1
  6. package/dist/manifest.json +1 -1
  7. package/dist/meta.json +438 -86
  8. package/dist/okf/types/DockerConfig.md +7 -5
  9. package/dist/okf/types/DockerSecret.md +8 -4
  10. package/dist/okf/types/Network.md +10 -6
  11. package/dist/okf/types/Service.md +93 -15
  12. package/dist/okf/types/Volume.md +5 -5
  13. package/dist/rules/cache-busting-copy.ts +2 -1
  14. package/dist/skills/chant-docker-patterns.md +2 -2
  15. package/dist/skills/chant-docker.md +1 -0
  16. package/dist/spec/parse-compose.d.ts +29 -2
  17. package/dist/spec/parse-compose.d.ts.map +1 -1
  18. package/dist/types/index.d.ts +263 -41
  19. package/package.json +3 -3
  20. package/src/codegen/__snapshots__/okf.test.ts.snap +123 -35
  21. package/src/codegen/generate.ts +53 -14
  22. package/src/codegen/okf.test.ts +1 -1
  23. package/src/generated/index.d.ts +263 -41
  24. package/src/generated/index.ts +279 -6
  25. package/src/generated/lexicon-docker.json +438 -86
  26. package/src/import/generator.test.ts +4 -4
  27. package/src/import/generator.ts +4 -4
  28. package/src/import/roundtrip.test.ts +62 -2
  29. package/src/import/testdata/configs-secrets.yaml +15 -0
  30. package/src/lint/post-synth/cache-busting-copy.ts +2 -1
  31. package/src/skills/chant-docker-patterns.md +2 -2
  32. package/src/skills/chant-docker.md +1 -0
  33. package/src/spec/parse-compose.ts +167 -95
  34. package/src/typecheck.e2e.test.ts +107 -0
  35. package/src/typed-props.test.ts +60 -0
@@ -1,13 +1,284 @@
1
1
  // Code generated by chant generate. DO NOT EDIT.
2
2
  import { createResource } from "./runtime";
3
+ import type { Declarable } from "@intentius/chant/declarable";
4
+ import type { EnvIntrinsic } from "../interpolation";
3
5
 
4
- export const Service = createResource("Docker::Compose::Service", "docker", {});
5
- export const Volume = createResource("Docker::Compose::Volume", "docker", {});
6
- export const Network = createResource("Docker::Compose::Network", "docker", {});
7
- export const DockerConfig = createResource("Docker::Compose::Config", "docker", {});
8
- export const DockerSecret = createResource("Docker::Compose::Secret", "docker", {});
6
+ /** A docker resource constructor whose props are type-checked. */
7
+ export type DockerResourceConstructor<P> = new (props?: P, attributes?: Record<string, unknown>) => InstanceType<ReturnType<typeof createResource>>;
9
8
 
10
- export const Dockerfile = createResource("Docker::Dockerfile", "docker", {});
9
+ /**
10
+ * A Compose string value: a string, an `env()` interpolation, or an entity
11
+ * (service, network, volume, config, secret or Dockerfile), which is written as its name.
12
+ */
13
+ export type ComposeString = string | EnvIntrinsic | Declarable;
14
+
15
+ /** A containerized service definition in Docker Compose */
16
+ export interface ServiceProps {
17
+ develop?: { watch?: Array<{ ignore?: ComposeString | Array<ComposeString>; include?: ComposeString | Array<ComposeString>; path: ComposeString; action: "rebuild" | "sync" | "restart" | "sync+restart" | "sync+exec"; target?: ComposeString; exec?: { command: null | ComposeString | Array<ComposeString>; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: `x-${string}`]: unknown }; initial_sync?: boolean; [key: `x-${string}`]: unknown }>; [key: `x-${string}`]: unknown } | null;
18
+ deploy?: { mode?: ComposeString; endpoint_mode?: ComposeString; replicas?: number | ComposeString; labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; rollback_config?: { parallelism?: number | ComposeString; delay?: ComposeString; failure_action?: ComposeString; monitor?: ComposeString; max_failure_ratio?: number | ComposeString; order?: "start-first" | "stop-first"; [key: `x-${string}`]: unknown }; update_config?: { parallelism?: number | ComposeString; delay?: ComposeString; failure_action?: ComposeString; monitor?: ComposeString; max_failure_ratio?: number | ComposeString; order?: "start-first" | "stop-first"; [key: `x-${string}`]: unknown }; resources?: { limits?: { cpus?: number | ComposeString; memory?: ComposeString; pids?: number | ComposeString; [key: `x-${string}`]: unknown }; reservations?: { cpus?: number | ComposeString; memory?: ComposeString; generic_resources?: Array<{ discrete_resource_spec?: { kind?: ComposeString; value?: number | ComposeString; [key: `x-${string}`]: unknown }; [key: `x-${string}`]: unknown }>; devices?: Array<{ capabilities: Array<ComposeString>; count?: ComposeString | number; device_ids?: Array<ComposeString>; driver?: ComposeString; options?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: `x-${string}`]: unknown }>; [key: `x-${string}`]: unknown }; [key: `x-${string}`]: unknown }; restart_policy?: { condition?: ComposeString; delay?: ComposeString; max_attempts?: number | ComposeString; window?: ComposeString; [key: `x-${string}`]: unknown }; placement?: { constraints?: Array<ComposeString>; preferences?: Array<{ spread?: ComposeString; [key: `x-${string}`]: unknown }>; max_replicas_per_node?: number | ComposeString; [key: `x-${string}`]: unknown }; [key: `x-${string}`]: unknown } | null;
19
+ annotations?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
20
+ attach?: boolean | ComposeString;
21
+ /** Configuration options for building the service's image. */
22
+ build?: ComposeString | { context?: ComposeString; dockerfile?: ComposeString; dockerfile_inline?: ComposeString; entitlements?: Array<ComposeString>; args?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; ssh?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; cache_from?: Array<ComposeString>; cache_to?: Array<ComposeString>; no_cache?: boolean | ComposeString; no_cache_filter?: ComposeString | Array<ComposeString>; additional_contexts?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; network?: ComposeString; provenance?: ComposeString | boolean; sbom?: ComposeString | boolean; pull?: boolean | ComposeString; target?: ComposeString; shm_size?: number | ComposeString; extra_hosts?: Record<string, ComposeString | Array<ComposeString>> | Array<ComposeString>; isolation?: ComposeString; privileged?: boolean | ComposeString; secrets?: Array<ComposeString | { source?: ComposeString; target?: ComposeString; uid?: ComposeString; gid?: ComposeString; mode?: number | ComposeString; [key: `x-${string}`]: unknown }>; tags?: Array<ComposeString>; ulimits?: Record<string, number | ComposeString | { hard: number | ComposeString; soft: number | ComposeString; [key: `x-${string}`]: unknown }>; platforms?: Array<ComposeString>; [key: `x-${string}`]: unknown };
23
+ /** Block IO configuration for the service. */
24
+ blkio_config?: { device_read_bps?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; device_read_iops?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; device_write_bps?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; device_write_iops?: Array<{ path?: ComposeString; rate?: number | ComposeString }>; weight?: number | ComposeString; weight_device?: Array<{ path?: ComposeString; weight?: number | ComposeString }> };
25
+ /** Add Linux capabilities. For example, 'CAP_SYS_ADMIN', 'SYS_ADMIN', or 'NET_ADMIN'. */
26
+ cap_add?: Array<ComposeString>;
27
+ /** Drop Linux capabilities. For example, 'CAP_SYS_ADMIN', 'SYS_ADMIN', or 'NET_ADMIN'. */
28
+ cap_drop?: Array<ComposeString>;
29
+ /** Specify the cgroup namespace to join. Use 'host' to use the host's cgroup namespace, or 'private' to use a private cgroup namespace. */
30
+ cgroup?: "host" | "private";
31
+ /** Specify an optional parent cgroup for the container. */
32
+ cgroup_parent?: ComposeString;
33
+ /** Override the default command declared by the container image, for example 'CMD' in Dockerfile. */
34
+ command?: null | ComposeString | Array<ComposeString>;
35
+ /** Grant access to Configs on a per-service basis. */
36
+ configs?: Array<ComposeString | { source?: ComposeString; target?: ComposeString; uid?: ComposeString; gid?: ComposeString; mode?: number | ComposeString; [key: `x-${string}`]: unknown }>;
37
+ /** Specify a custom container name, rather than a generated default name. */
38
+ container_name?: ComposeString;
39
+ /** Number of usable CPUs. */
40
+ cpu_count?: ComposeString | number;
41
+ /** Percentage of CPU resources to use. */
42
+ cpu_percent?: ComposeString | number;
43
+ /** CPU shares (relative weight) for the container. */
44
+ cpu_shares?: number | ComposeString;
45
+ /** Limit the CPU CFS (Completely Fair Scheduler) quota. */
46
+ cpu_quota?: number | ComposeString;
47
+ /** Limit the CPU CFS (Completely Fair Scheduler) period. */
48
+ cpu_period?: number | ComposeString;
49
+ /** Limit the CPU real-time period in microseconds or a duration. */
50
+ cpu_rt_period?: number | ComposeString;
51
+ /** Limit the CPU real-time runtime in microseconds or a duration. */
52
+ cpu_rt_runtime?: number | ComposeString;
53
+ /** Number of CPUs to use. A floating-point value is supported to request partial CPUs. */
54
+ cpus?: number | ComposeString;
55
+ /** CPUs in which to allow execution (0-3, 0,1). */
56
+ cpuset?: ComposeString;
57
+ /** Configure the credential spec for managed service account. */
58
+ credential_spec?: { config?: ComposeString; file?: ComposeString; registry?: ComposeString; [key: `x-${string}`]: unknown };
59
+ /** Express dependency between services. Service dependencies cause services to be started in dependency order. The dependent service will wait for the dependency to be ready before starting. */
60
+ depends_on?: Array<ComposeString> | Record<string, { restart?: boolean | ComposeString; required?: boolean; condition: "service_started" | "service_healthy" | "service_completed_successfully"; [key: `x-${string}`]: unknown }>;
61
+ /** Add rules to the cgroup allowed devices list. */
62
+ device_cgroup_rules?: Array<ComposeString>;
63
+ /** List of device mappings for the container. */
64
+ devices?: Array<ComposeString | { source: ComposeString; target?: ComposeString; permissions?: ComposeString; [key: `x-${string}`]: unknown }>;
65
+ /** Custom DNS servers to set for the service container. */
66
+ dns?: ComposeString | Array<ComposeString>;
67
+ /** Custom DNS options to be passed to the container's DNS resolver. */
68
+ dns_opt?: Array<ComposeString>;
69
+ /** Custom DNS search domains to set on the service container. */
70
+ dns_search?: ComposeString | Array<ComposeString>;
71
+ /** Custom domain name to use for the service container. */
72
+ domainname?: ComposeString;
73
+ /** Override the default entrypoint declared by the container image, for example 'ENTRYPOINT' in Dockerfile. */
74
+ entrypoint?: null | ComposeString | Array<ComposeString>;
75
+ /** Add environment variables from a file or multiple files. Can be a single file path or a list of file paths. */
76
+ env_file?: ComposeString | Array<ComposeString | { path: ComposeString; format?: ComposeString; required?: boolean | ComposeString }>;
77
+ /** Add metadata to containers using files containing Docker labels. */
78
+ label_file?: ComposeString | Array<ComposeString>;
79
+ /** Add environment variables. You can use either an array or a list of KEY=VAL pairs. */
80
+ environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
81
+ /** Expose ports without publishing them to the host machine - they'll only be accessible to linked services. */
82
+ expose?: Array<ComposeString | number>;
83
+ /** Extend another service, in the current file or another file. */
84
+ extends?: ComposeString | { service: ComposeString; file?: ComposeString };
85
+ /** Specify a service which will not be manage by Compose directly, and delegate its management to an external provider. */
86
+ provider?: { type: ComposeString; options?: Record<string, ComposeString | number | boolean | Array<ComposeString | number | boolean>>; [key: `x-${string}`]: unknown };
87
+ /** Link to services started outside this Compose application. Specify services as <service_name>:<alias>. */
88
+ external_links?: Array<ComposeString>;
89
+ /** Add hostname mappings to the container network interface configuration. */
90
+ extra_hosts?: Record<string, ComposeString | Array<ComposeString>> | Array<ComposeString>;
91
+ /** Define GPU devices to use. Can be set to 'all' to use all GPUs, or a list of specific GPU devices. */
92
+ gpus?: "all" | Array<{ capabilities?: Array<ComposeString>; count?: ComposeString | number; device_ids?: Array<ComposeString>; driver?: ComposeString; options?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString> }>;
93
+ /** Add additional groups which user inside the container should be member of. */
94
+ group_add?: Array<ComposeString | number>;
95
+ /** Configure a health check for the container to monitor its health status. */
96
+ healthcheck?: { disable?: boolean | ComposeString; interval?: ComposeString; retries?: number | ComposeString; test?: ComposeString | Array<ComposeString>; timeout?: ComposeString; start_period?: ComposeString; start_interval?: ComposeString; [key: `x-${string}`]: unknown };
97
+ /** Define a custom hostname for the service container. */
98
+ hostname?: ComposeString;
99
+ /** Specify the image to start the container from. Can be a repository/tag, a digest, or a local image ID. */
100
+ image?: ComposeString;
101
+ /** Run as an init process inside the container that forwards signals and reaps processes. */
102
+ init?: boolean | ComposeString;
103
+ /** IPC sharing mode for the service container. Use 'host' to share the host's IPC namespace, 'service:[service_name]' to share with another service, or 'shareable' to allow other services to share this service's IPC namespace. */
104
+ ipc?: ComposeString;
105
+ /** Container isolation technology to use. Supported values are platform-specific. */
106
+ isolation?: ComposeString;
107
+ /** Add metadata to containers using Docker labels. You can use either an array or a list. */
108
+ labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
109
+ /** Link to containers in another service. Either specify both the service name and a link alias (SERVICE:ALIAS), or just the service name. */
110
+ links?: Array<ComposeString>;
111
+ /** Logging configuration for the service. */
112
+ logging?: { driver?: ComposeString; options?: Record<string, ComposeString | number | null>; [key: `x-${string}`]: unknown };
113
+ /** Container MAC address to set. */
114
+ mac_address?: ComposeString;
115
+ /** Memory limit for the container. A string value can use suffix like '2g' for 2 gigabytes. */
116
+ mem_limit?: number | ComposeString;
117
+ /** Memory reservation for the container. */
118
+ mem_reservation?: ComposeString | number;
119
+ /** Container memory swappiness as percentage (0 to 100). */
120
+ mem_swappiness?: number | ComposeString;
121
+ /** Amount of memory the container is allowed to swap to disk. Set to -1 to enable unlimited swap. */
122
+ memswap_limit?: number | ComposeString;
123
+ /** Network mode. Values can be 'bridge', 'host', 'none', 'service:[service name]', or 'container:[container name]'. */
124
+ network_mode?: ComposeString;
125
+ /** AI Models to use, referencing entries under the top-level models key. */
126
+ models?: Array<ComposeString> | Record<string, { endpoint_var?: ComposeString; model_var?: ComposeString; [key: `x-${string}`]: unknown } | null>;
127
+ /** Networks to join, referencing entries under the top-level networks key. Can be a list of network names or a mapping of network name to network configuration. */
128
+ networks?: Array<ComposeString> | Record<string, { aliases?: Array<ComposeString>; interface_name?: ComposeString; ipv4_address?: ComposeString; ipv6_address?: ComposeString; link_local_ips?: Array<ComposeString>; mac_address?: ComposeString; driver_opts?: Record<string, ComposeString | number>; priority?: number; gw_priority?: number; [key: `x-${string}`]: unknown } | null>;
129
+ /** Disable OOM Killer for the container. */
130
+ oom_kill_disable?: boolean | ComposeString;
131
+ /** Tune host's OOM preferences for the container (accepts -1000 to 1000). */
132
+ oom_score_adj?: ComposeString | number;
133
+ /** PID mode for container. */
134
+ pid?: ComposeString | null;
135
+ /** Tune a container's PIDs limit. Set to -1 for unlimited PIDs. */
136
+ pids_limit?: number | ComposeString;
137
+ /** Target platform to run on, e.g., 'linux/amd64', 'linux/arm64', or 'windows/amd64'. */
138
+ platform?: ComposeString;
139
+ /** Expose container ports. Short format ([HOST:]CONTAINER[/PROTOCOL]). */
140
+ ports?: Array<number | ComposeString | { name?: ComposeString; mode?: ComposeString; host_ip?: ComposeString; target?: number | ComposeString; published?: ComposeString | number; protocol?: ComposeString; app_protocol?: ComposeString; [key: `x-${string}`]: unknown }>;
141
+ /** Init containers to run to completion before the service container is started. Each step runs in its own ephemeral container, in declared order; a non-zero exit fails the bring-up of the service and its dependents. */
142
+ pre_start?: Array<{ command?: null | ComposeString | Array<ComposeString>; image?: ComposeString; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; per_replica?: boolean | ComposeString; [key: `x-${string}`]: unknown }>;
143
+ /** Commands to run after the container starts. If any command fails, the container stops. */
144
+ post_start?: Array<{ command: null | ComposeString | Array<ComposeString>; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: `x-${string}`]: unknown }>;
145
+ /** Commands to run before the container stops. If any command fails, the container stop is aborted. */
146
+ pre_stop?: Array<{ command: null | ComposeString | Array<ComposeString>; user?: ComposeString; privileged?: boolean | ComposeString; working_dir?: ComposeString; environment?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; [key: `x-${string}`]: unknown }>;
147
+ /** Give extended privileges to the service container. */
148
+ privileged?: boolean | ComposeString;
149
+ /** List of profiles for this service. When profiles are specified, services are only started when the profile is activated. */
150
+ profiles?: Array<ComposeString>;
151
+ /** Policy for pulling images. Options include: 'always', 'never', 'if_not_present', 'missing', 'build', or time-based refresh policies. */
152
+ pull_policy?: ComposeString;
153
+ /** Time after which to refresh the image. Used with pull_policy=refresh. */
154
+ pull_refresh_after?: ComposeString;
155
+ /** Mount the container's filesystem as read only. */
156
+ read_only?: boolean | ComposeString;
157
+ /** Restart policy for the service container. Options include: 'no', 'always', 'on-failure', and 'unless-stopped'. */
158
+ restart?: ComposeString;
159
+ /** Runtime to use for this container, e.g., 'runc'. */
160
+ runtime?: ComposeString;
161
+ /** Number of containers to deploy for this service. */
162
+ scale?: number | ComposeString;
163
+ /** Override the default labeling scheme for each container. */
164
+ security_opt?: Array<ComposeString>;
165
+ /** Size of /dev/shm. A string value can use suffix like '2g' for 2 gigabytes. */
166
+ shm_size?: number | ComposeString;
167
+ /** Grant access to Secrets on a per-service basis. */
168
+ secrets?: Array<ComposeString | { source?: ComposeString; target?: ComposeString; uid?: ComposeString; gid?: ComposeString; mode?: number | ComposeString; [key: `x-${string}`]: unknown }>;
169
+ /** Kernel parameters to set in the container. You can use either an array or a list. */
170
+ sysctls?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
171
+ /** Keep STDIN open even if not attached. */
172
+ stdin_open?: boolean | ComposeString;
173
+ /** Time to wait for the container to stop gracefully before sending SIGKILL (e.g., '1s', '1m30s'). */
174
+ stop_grace_period?: ComposeString;
175
+ /** Signal to stop the container (e.g., 'SIGTERM', 'SIGINT'). */
176
+ stop_signal?: ComposeString;
177
+ /** Storage driver options for the container. */
178
+ storage_opt?: Record<string, unknown>;
179
+ /** Mount a temporary filesystem (tmpfs) into the container. Can be a single value or a list. */
180
+ tmpfs?: ComposeString | Array<ComposeString>;
181
+ /** Allocate a pseudo-TTY to service container. */
182
+ tty?: boolean | ComposeString;
183
+ /** Override the default ulimits for a container. */
184
+ ulimits?: Record<string, number | ComposeString | { hard: number | ComposeString; soft: number | ComposeString; [key: `x-${string}`]: unknown }>;
185
+ /** Bind mount Docker API socket and required auth. */
186
+ use_api_socket?: boolean;
187
+ /** Username or UID to run the container process as. */
188
+ user?: ComposeString;
189
+ /** UTS namespace to use. 'host' shares the host's UTS namespace. */
190
+ uts?: ComposeString;
191
+ /** User namespace to use. 'host' shares the host's user namespace. */
192
+ userns_mode?: ComposeString;
193
+ /** Mount host paths or named volumes accessible to the container. Short syntax (VOLUME:CONTAINER_PATH[:MODE]) */
194
+ volumes?: Array<ComposeString | { type: "bind" | "volume" | "tmpfs" | "cluster" | "npipe" | "image"; source?: ComposeString; target?: ComposeString; read_only?: boolean | ComposeString; consistency?: ComposeString; bind?: { propagation?: ComposeString; create_host_path?: boolean | ComposeString; recursive?: "enabled" | "disabled" | "writable" | "readonly"; selinux?: "z" | "Z"; [key: `x-${string}`]: unknown }; volume?: { labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>; nocopy?: boolean | ComposeString; subpath?: ComposeString; [key: `x-${string}`]: unknown }; tmpfs?: { size?: number | ComposeString; mode?: number | ComposeString; [key: `x-${string}`]: unknown }; image?: { subpath?: ComposeString; [key: `x-${string}`]: unknown }; [key: `x-${string}`]: unknown }>;
195
+ /** Mount volumes from another service or container. Optionally specify read-only access (ro) or read-write (rw). */
196
+ volumes_from?: Array<ComposeString>;
197
+ /** The working directory in which the entrypoint or command will be run */
198
+ working_dir?: ComposeString;
199
+ }
200
+
201
+ /** A named volume definition in Docker Compose */
202
+ export interface VolumeProps {
203
+ /** Custom name for this volume. */
204
+ name?: ComposeString;
205
+ /** Specify which volume driver should be used for this volume. */
206
+ driver?: ComposeString;
207
+ /** Specify driver-specific options. */
208
+ driver_opts?: Record<string, ComposeString | number>;
209
+ /** Specifies that this volume already exists and was created outside of Compose. */
210
+ external?: boolean | ComposeString | { name?: ComposeString; [key: `x-${string}`]: unknown };
211
+ /** Add metadata to the volume using labels. */
212
+ labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
213
+ }
214
+
215
+ /** A network definition in Docker Compose */
216
+ export interface NetworkProps {
217
+ /** Custom name for this network. */
218
+ name?: ComposeString;
219
+ /** Specify which driver should be used for this network. Default is 'bridge'. */
220
+ driver?: ComposeString;
221
+ /** Specify driver-specific options defined as key/value pairs. */
222
+ driver_opts?: Record<string, ComposeString | number>;
223
+ /** Custom IP Address Management configuration for this network. */
224
+ ipam?: { driver?: ComposeString; config?: Array<{ subnet?: ComposeString; ip_range?: ComposeString; gateway?: ComposeString; aux_addresses?: Record<string, ComposeString>; [key: `x-${string}`]: unknown }>; options?: Record<string, ComposeString>; [key: `x-${string}`]: unknown };
225
+ /** Specifies that this network already exists and was created outside of Compose. */
226
+ external?: boolean | ComposeString | { name?: ComposeString; [key: `x-${string}`]: unknown };
227
+ /** Create an externally isolated network. */
228
+ internal?: boolean | ComposeString;
229
+ /** Enable IPv4 networking. */
230
+ enable_ipv4?: boolean | ComposeString;
231
+ /** Enable IPv6 networking. */
232
+ enable_ipv6?: boolean | ComposeString;
233
+ /** If true, standalone containers can attach to this network. */
234
+ attachable?: boolean | ComposeString;
235
+ /** Add metadata to the network using labels. */
236
+ labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
237
+ }
238
+
239
+ /** A config definition in Docker Compose */
240
+ export interface DockerConfigProps {
241
+ /** Custom name for this config. */
242
+ name?: ComposeString;
243
+ /** Inline content of the config. */
244
+ content?: ComposeString;
245
+ /** Name of an environment variable from which to get the config value. */
246
+ environment?: ComposeString;
247
+ /** Path to a file containing the config value. */
248
+ file?: ComposeString;
249
+ /** Specifies that this config already exists and was created outside of Compose. */
250
+ external?: boolean | ComposeString | { name?: ComposeString };
251
+ /** Add metadata to the config using labels. */
252
+ labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
253
+ /** Driver to use for templating the config's value. */
254
+ template_driver?: ComposeString;
255
+ }
256
+
257
+ /** A secret definition in Docker Compose */
258
+ export interface DockerSecretProps {
259
+ /** Custom name for this secret. */
260
+ name?: ComposeString;
261
+ /** Name of an environment variable from which to get the secret value. */
262
+ environment?: ComposeString;
263
+ /** Path to a file containing the secret value. */
264
+ file?: ComposeString;
265
+ /** Specifies that this secret already exists and was created outside of Compose. */
266
+ external?: boolean | ComposeString | { name?: ComposeString };
267
+ /** Add metadata to the secret using labels. */
268
+ labels?: Record<string, ComposeString | number | boolean | null> | Array<ComposeString>;
269
+ /** Specify which secret driver should be used for this secret. */
270
+ driver?: ComposeString;
271
+ /** Specify driver-specific options. */
272
+ driver_opts?: Record<string, ComposeString | number>;
273
+ /** Driver to use for templating the secret's value. */
274
+ template_driver?: ComposeString;
275
+ }
276
+
277
+ export const Service = createResource("Docker::Compose::Service", "docker", {}) as unknown as DockerResourceConstructor<ServiceProps>;
278
+ export const Volume = createResource("Docker::Compose::Volume", "docker", {}) as unknown as DockerResourceConstructor<VolumeProps>;
279
+ export const Network = createResource("Docker::Compose::Network", "docker", {}) as unknown as DockerResourceConstructor<NetworkProps>;
280
+ export const DockerConfig = createResource("Docker::Compose::Config", "docker", {}) as unknown as DockerResourceConstructor<DockerConfigProps>;
281
+ export const DockerSecret = createResource("Docker::Compose::Secret", "docker", {}) as unknown as DockerResourceConstructor<DockerSecretProps>;
11
282
 
12
283
  /** The Dockerfile instructions a step can name. FROM is the stage's own `from` field. */
13
284
  export type DockerfileInstructionName = "arg" | "env" | "run" | "copy" | "add" | "workdir" | "user" | "expose" | "volume" | "label" | "entrypoint" | "cmd" | "healthcheck" | "shell" | "stopsignal" | "onbuild";
@@ -125,3 +396,5 @@ export interface DockerfileProps {
125
396
  /** HEALTHCHECK as a per-kind field, written in the fixed order. Use `steps` to choose the order. */
126
397
  healthcheck?: string;
127
398
  }
399
+
400
+ export const Dockerfile = createResource("Docker::Dockerfile", "docker", {}) as unknown as DockerResourceConstructor<DockerfileProps>;