the-moby-effect 1.43.0-alpha.0

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 (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -0
  3. package/dist/src/agent-helpers.d.ts +59 -0
  4. package/dist/src/agent-helpers.js +84 -0
  5. package/dist/src/agent-helpers.js.map +1 -0
  6. package/dist/src/configs.d.ts +105 -0
  7. package/dist/src/configs.js +29 -0
  8. package/dist/src/configs.js.map +1 -0
  9. package/dist/src/containers.d.ts +611 -0
  10. package/dist/src/containers.js +82 -0
  11. package/dist/src/containers.js.map +1 -0
  12. package/dist/src/custom-helpers.d.ts +23 -0
  13. package/dist/src/custom-helpers.js +41 -0
  14. package/dist/src/custom-helpers.js.map +1 -0
  15. package/dist/src/distribution.d.ts +28 -0
  16. package/dist/src/distribution.js +21 -0
  17. package/dist/src/distribution.js.map +1 -0
  18. package/dist/src/execs.d.ts +69 -0
  19. package/dist/src/execs.js +26 -0
  20. package/dist/src/execs.js.map +1 -0
  21. package/dist/src/images.d.ts +657 -0
  22. package/dist/src/images.js +61 -0
  23. package/dist/src/images.js.map +1 -0
  24. package/dist/src/index.d.ts +38 -0
  25. package/dist/src/index.js +38 -0
  26. package/dist/src/index.js.map +1 -0
  27. package/dist/src/networks.d.ts +151 -0
  28. package/dist/src/networks.js +40 -0
  29. package/dist/src/networks.js.map +1 -0
  30. package/dist/src/nodes.d.ts +99 -0
  31. package/dist/src/nodes.js +27 -0
  32. package/dist/src/nodes.js.map +1 -0
  33. package/dist/src/plugins.d.ts +253 -0
  34. package/dist/src/plugins.js +47 -0
  35. package/dist/src/plugins.js.map +1 -0
  36. package/dist/src/request-helpers.d.ts +6 -0
  37. package/dist/src/request-helpers.js +15 -0
  38. package/dist/src/request-helpers.js.map +1 -0
  39. package/dist/src/schemas.d.ts +7279 -0
  40. package/dist/src/schemas.js +3772 -0
  41. package/dist/src/schemas.js.map +1 -0
  42. package/dist/src/secrets.d.ts +100 -0
  43. package/dist/src/secrets.js +29 -0
  44. package/dist/src/secrets.js.map +1 -0
  45. package/dist/src/services.d.ts +185 -0
  46. package/dist/src/services.js +32 -0
  47. package/dist/src/services.js.map +1 -0
  48. package/dist/src/session.d.ts +29 -0
  49. package/dist/src/session.js +20 -0
  50. package/dist/src/session.js.map +1 -0
  51. package/dist/src/swarm.d.ts +80 -0
  52. package/dist/src/swarm.js +39 -0
  53. package/dist/src/swarm.js.map +1 -0
  54. package/dist/src/system.d.ts +100 -0
  55. package/dist/src/system.js +40 -0
  56. package/dist/src/system.js.map +1 -0
  57. package/dist/src/tasks.d.ts +102 -0
  58. package/dist/src/tasks.js +26 -0
  59. package/dist/src/tasks.js.map +1 -0
  60. package/dist/src/volumes.d.ts +143 -0
  61. package/dist/src/volumes.js +29 -0
  62. package/dist/src/volumes.js.map +1 -0
  63. package/package.json +66 -0
@@ -0,0 +1,657 @@
1
+ import * as Schema from "@effect/schema/Schema";
2
+ import { Context, Effect, Layer, Scope, Stream } from "effect";
3
+ import { IMobyConnectionAgent, MobyConnectionOptions } from "./agent-helpers.js";
4
+ import { BuildPruneResponse, ContainerConfig, HistoryResponseItem, IdResponse, ImageDeleteResponseItem, ImageInspect, ImagePruneResponse, ImageSearchResponseItem, ImageSummary } from "./schemas.js";
5
+ declare const ImagesError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<Omit<A, keyof import("effect/Equal").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal").Equal ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
6
+ readonly _tag: "ImagesError";
7
+ } & Readonly<A>;
8
+ export declare class ImagesError extends ImagesError_base<{
9
+ method: string;
10
+ message: string;
11
+ }> {
12
+ }
13
+ export interface ImageListOptions {
14
+ /**
15
+ * Show all images. Only images from a final layer (no children) are shown
16
+ * by default.
17
+ */
18
+ readonly all?: boolean;
19
+ /**
20
+ * A JSON encoded value of the filters (a `map[string][]string`) to process
21
+ * on the images list.
22
+ *
23
+ * Available filters:
24
+ *
25
+ * - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
26
+ * - `dangling=true`
27
+ * - `label=key` or `label="key=value"` of an image label
28
+ * - `reference`=(`<image-name>[:<tag>]`)
29
+ * - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
30
+ * - `until=<timestamp>`
31
+ */
32
+ readonly filters?: string;
33
+ /** Compute and show shared size as a `SharedSize` field on each image. */
34
+ readonly "shared-size"?: boolean;
35
+ /** Show digest information as a `RepoDigests` field on each image. */
36
+ readonly digests?: boolean;
37
+ }
38
+ export interface ImageBuildOptions {
39
+ /**
40
+ * A tar archive compressed with one of the following algorithms: identity
41
+ * (no compression), gzip, bzip2, xz.
42
+ */
43
+ readonly stream: Stream.Stream<never, never, Uint8Array>;
44
+ /**
45
+ * Path within the build context to the `Dockerfile`. This is ignored if
46
+ * `remote` is specified and points to an external `Dockerfile`.
47
+ */
48
+ readonly dockerfile?: string;
49
+ /**
50
+ * A name and optional tag to apply to the image in the `name:tag` format.
51
+ * If you omit the tag the default `latest` value is assumed. You can
52
+ * provide several `t` parameters.
53
+ */
54
+ readonly t?: string;
55
+ /** Extra hosts to add to /etc/hosts */
56
+ readonly extrahosts?: string;
57
+ /**
58
+ * A Git repository URI or HTTP/HTTPS context URI. If the URI points to a
59
+ * single text file, the file’s contents are placed into a file called
60
+ * `Dockerfile` and the image is built from that file. If the URI points to
61
+ * a tarball, the file is downloaded by the daemon and the contents therein
62
+ * used as the context for the build. If the URI points to a tarball and the
63
+ * `dockerfile` parameter is also specified, there must be a file with the
64
+ * corresponding path inside the tarball.
65
+ */
66
+ readonly remote?: string;
67
+ /** Suppress verbose build output. */
68
+ readonly q?: boolean;
69
+ /** Do not use the cache when building the image. */
70
+ readonly nocache?: boolean;
71
+ /** JSON array of images used for build cache resolution. */
72
+ readonly cachefrom?: string;
73
+ /** Attempt to pull the image even if an older image exists locally. */
74
+ readonly pull?: string;
75
+ /** Remove intermediate containers after a successful build. */
76
+ readonly rm?: boolean;
77
+ /** Always remove intermediate containers, even upon failure. */
78
+ readonly forcerm?: boolean;
79
+ /** Set memory limit for build. */
80
+ readonly memory?: number;
81
+ /** Total memory (memory + swap). Set as `-1` to disable swap. */
82
+ readonly memswap?: number;
83
+ /** CPU shares (relative weight). */
84
+ readonly cpushares?: number;
85
+ /** CPUs in which to allow execution (e.g., `0-3`, `0,1`). */
86
+ readonly cpusetcpus?: string;
87
+ /** The length of a CPU period in microseconds. */
88
+ readonly cpuperiod?: number;
89
+ /** Microseconds of CPU time that the container can get in a CPU period. */
90
+ readonly cpuquota?: number;
91
+ /**
92
+ * JSON map of string pairs for build-time variables. Users pass these
93
+ * values at build-time. Docker uses the buildargs as the environment
94
+ * context for commands run via the `Dockerfile` RUN instruction, or for
95
+ * variable expansion in other `Dockerfile` instructions. This is not meant
96
+ * for passing secret values.
97
+ *
98
+ * For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in
99
+ * JSON. This would result in the query parameter `buildargs={"FOO":"bar"}`.
100
+ * Note that `{"FOO":"bar"}` should be URI component encoded.
101
+ *
102
+ * [Read more about the buildargs
103
+ * instruction.](https://docs.docker.com/engine/reference/builder/#arg)
104
+ */
105
+ readonly buildargs?: string;
106
+ /**
107
+ * Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted
108
+ * the system uses 64MB.
109
+ */
110
+ readonly shmsize?: number;
111
+ /**
112
+ * Squash the resulting images layers into a single layer. _(Experimental
113
+ * release only.)_
114
+ */
115
+ readonly squash?: boolean;
116
+ /**
117
+ * Arbitrary key/value labels to set on the image, as a JSON map of string
118
+ * pairs.
119
+ */
120
+ readonly labels?: string;
121
+ /**
122
+ * Sets the networking mode for the run commands during build. Supported
123
+ * standard values are: `bridge`, `host`, `none`, and `container:<name|id>`.
124
+ * Any other value is taken as a custom network's name or ID to which this
125
+ * container should connect to.
126
+ */
127
+ readonly networkmode?: string;
128
+ readonly "Content-type"?: string;
129
+ /**
130
+ * This is a base64-encoded JSON object with auth configurations for
131
+ * multiple registries that a build may refer to.
132
+ *
133
+ * The key is a registry URL, and the value is an auth configuration object,
134
+ * [as described in the authentication section](#section/Authentication).
135
+ * For example:
136
+ *
137
+ * {
138
+ * "docker.example.com": {
139
+ * "username": "janedoe",
140
+ * "password": "hunter2"
141
+ * },
142
+ * "https://index.docker.io/v1/": {
143
+ * "username": "mobydock",
144
+ * "password": "conta1n3rize14"
145
+ * }
146
+ * }
147
+ *
148
+ * Only the registry domain name (and port if not the default 443) are
149
+ * required. However, for legacy reasons, the Docker Hub registry must be
150
+ * specified with both a `https://` prefix and a `/v1/` suffix even though
151
+ * Docker will prefer to use the v2 registry API.
152
+ */
153
+ readonly "X-Registry-Config"?: string;
154
+ /** Platform in the format os[/arch[/variant]] */
155
+ readonly platform?: string;
156
+ /** Target build stage */
157
+ readonly target?: string;
158
+ /** BuildKit output configuration */
159
+ readonly outputs?: string;
160
+ }
161
+ export interface BuildPruneOptions {
162
+ /** Amount of disk space in bytes to keep for cache */
163
+ readonly "keep-storage"?: number;
164
+ /** Remove all types of build cache */
165
+ readonly all?: boolean;
166
+ /**
167
+ * A JSON encoded value of the filters (a `map[string][]string`) to process
168
+ * on the list of build cache objects.
169
+ *
170
+ * Available filters:
171
+ *
172
+ * - `until=<timestamp>` remove cache older than `<timestamp>`. The
173
+ * `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go
174
+ * duration strings (e.g. `10m`, `1h30m`) computed relative to the
175
+ * daemon's local time.
176
+ * - `id=<id>`
177
+ * - `parent=<id>`
178
+ * - `type=<string>`
179
+ * - `description=<string>`
180
+ * - `inuse`
181
+ * - `shared`
182
+ * - `private`
183
+ */
184
+ readonly filters?: string;
185
+ }
186
+ export interface ImageCreateOptions {
187
+ /**
188
+ * Name of the image to pull. The name may include a tag or digest. This
189
+ * parameter may only be used when pulling an image. The pull is cancelled
190
+ * if the HTTP connection is closed.
191
+ */
192
+ readonly fromImage?: string;
193
+ /**
194
+ * Source to import. The value may be a URL from which the image can be
195
+ * retrieved or `-` to read the image from the request body. This parameter
196
+ * may only be used when importing an image.
197
+ */
198
+ readonly fromSrc?: string;
199
+ /**
200
+ * Repository name given to an image when it is imported. The repo may
201
+ * include a tag. This parameter may only be used when importing an image.
202
+ */
203
+ readonly repo?: string;
204
+ /**
205
+ * Tag or digest. If empty when pulling an image, this causes all tags for
206
+ * the given image to be pulled.
207
+ */
208
+ readonly tag?: string;
209
+ /** Set commit message for imported image. */
210
+ readonly message?: string;
211
+ /**
212
+ * Image content if the value `-` has been specified in fromSrc query
213
+ * parameter
214
+ */
215
+ readonly inputImage?: string;
216
+ /**
217
+ * A base64url-encoded auth configuration.
218
+ *
219
+ * Refer to the [authentication section](#section/Authentication) for
220
+ * details.
221
+ */
222
+ readonly "X-Registry-Auth"?: string;
223
+ /**
224
+ * Apply `Dockerfile` instructions to the image that is created, for
225
+ * example: `changes=ENV DEBUG=true`. Note that `ENV DEBUG=true` should be
226
+ * URI component encoded.
227
+ *
228
+ * Supported `Dockerfile` instructions:
229
+ * `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
230
+ */
231
+ readonly changes?: string;
232
+ /**
233
+ * Platform in the format os[/arch[/variant]].
234
+ *
235
+ * When used in combination with the `fromImage` option, the daemon checks
236
+ * if the given image is present in the local image cache with the given OS
237
+ * and Architecture, and otherwise attempts to pull the image. If the option
238
+ * is not set, the host's native OS and Architecture are used. If the given
239
+ * image does not exist in the local image cache, the daemon attempts to
240
+ * pull the image with the host's native OS and Architecture. If the given
241
+ * image does exists in the local image cache, but its OS or architecture
242
+ * does not match, a warning is produced.
243
+ *
244
+ * When used with the `fromSrc` option to import an image from an archive,
245
+ * this option sets the platform information for the imported image. If the
246
+ * option is not set, the host's native OS and Architecture are used for the
247
+ * imported image.
248
+ */
249
+ readonly platform?: string;
250
+ }
251
+ export interface ImageInspectOptions {
252
+ /** Image name or id */
253
+ readonly name: string;
254
+ }
255
+ export interface ImageHistoryOptions {
256
+ /** Image name or ID */
257
+ readonly name: string;
258
+ }
259
+ export interface ImagePushOptions {
260
+ /** Image name or ID. */
261
+ readonly name: string;
262
+ /** The tag to associate with the image on the registry. */
263
+ readonly tag?: string;
264
+ /**
265
+ * A base64url-encoded auth configuration.
266
+ *
267
+ * Refer to the [authentication section](#section/Authentication) for
268
+ * details.
269
+ */
270
+ readonly "X-Registry-Auth": string;
271
+ }
272
+ export interface ImageTagOptions {
273
+ /** Image name or ID to tag. */
274
+ readonly name: string;
275
+ /** The repository to tag in. For example, `someuser/someimage`. */
276
+ readonly repo?: string;
277
+ /** The name of the new tag. */
278
+ readonly tag?: string;
279
+ }
280
+ export interface ImageDeleteOptions {
281
+ /** Image name or ID */
282
+ readonly name: string;
283
+ /**
284
+ * Remove the image even if it is being used by stopped containers or has
285
+ * other tags
286
+ */
287
+ readonly force?: boolean;
288
+ /** Do not delete untagged parent images */
289
+ readonly noprune?: boolean;
290
+ }
291
+ export interface ImageSearchOptions {
292
+ /** Term to search */
293
+ readonly term: string;
294
+ /** Maximum number of results to return */
295
+ readonly limit?: number;
296
+ /**
297
+ * A JSON encoded value of the filters (a `map[string][]string`) to process
298
+ * on the images list. Available filters:
299
+ *
300
+ * - `is-automated=(true|false)` (deprecated, see below)
301
+ * - `is-official=(true|false)`
302
+ * - `stars=<number>` Matches images that has at least 'number' stars.
303
+ *
304
+ * The `is-automated` filter is deprecated. The `is_automated` field has
305
+ * been deprecated by Docker Hub's search API. Consequently, searching for
306
+ * `is-automated=true` will yield no results.
307
+ */
308
+ readonly filters?: string;
309
+ }
310
+ export interface ImagePruneOptions {
311
+ /**
312
+ * Filters to process on the prune list, encoded as JSON (a
313
+ * `map[string][]string`). Available filters:
314
+ *
315
+ * - `dangling=<boolean>` When set to `true` (or `1`), prune only unused _and_
316
+ * untagged images. When set to `false` (or `0`), all unused images are
317
+ * pruned.
318
+ * - `until=<string>` Prune images created before this timestamp. The
319
+ * `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go
320
+ * duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon
321
+ * machine’s time.
322
+ * - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or
323
+ * `label!=<key>=<value>`) Prune images with (or without, in case
324
+ * `label!=...` is used) the specified labels.
325
+ */
326
+ readonly filters?: {
327
+ dangling?: ["true" | "false"] | undefined;
328
+ until?: [string] | undefined;
329
+ label?: string[] | undefined;
330
+ };
331
+ }
332
+ export interface ImageCommitOptions {
333
+ /** The container configuration */
334
+ readonly containerConfig: ContainerConfig;
335
+ /** The ID or name of the container to commit */
336
+ readonly container?: string;
337
+ /** Repository name for the created image */
338
+ readonly repo?: string;
339
+ /** Tag name for the create image */
340
+ readonly tag?: string;
341
+ /** Commit message */
342
+ readonly comment?: string;
343
+ /** Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`) */
344
+ readonly author?: string;
345
+ /** Whether to pause the container before committing */
346
+ readonly pause?: boolean;
347
+ /** `Dockerfile` instructions to apply while committing */
348
+ readonly changes?: string;
349
+ }
350
+ export interface ImageGetOptions {
351
+ /** Image name or ID */
352
+ readonly name: string;
353
+ }
354
+ export interface ImageGetAllOptions {
355
+ /** Image names to filter by */
356
+ readonly names?: Array<string> | undefined;
357
+ }
358
+ export interface ImageLoadOptions {
359
+ /** Tar archive containing images */
360
+ readonly imagesTarball: Stream.Stream<never, never, Uint8Array>;
361
+ /** Suppress progress details during load. */
362
+ readonly quiet?: boolean;
363
+ }
364
+ export interface Images {
365
+ /**
366
+ * List Images
367
+ *
368
+ * @param all - Show all images. Only images from a final layer (no
369
+ * children) are shown by default.
370
+ * @param filters - A JSON encoded value of the filters (a
371
+ * `map[string][]string`) to process on the images list.
372
+ *
373
+ * Available filters:
374
+ *
375
+ * - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
376
+ * - `dangling=true`
377
+ * - `label=key` or `label="key=value"` of an image label
378
+ * - `reference`=(`<image-name>[:<tag>]`)
379
+ * - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
380
+ * - `until=<timestamp>`
381
+ *
382
+ * @param shared-size - Compute and show shared size as a `SharedSize` field
383
+ * on each image.
384
+ * @param digests - Show digest information as a `RepoDigests` field on each
385
+ * image.
386
+ */
387
+ readonly list: (options?: ImageListOptions | undefined) => Effect.Effect<never, ImagesError, Readonly<Array<ImageSummary>>>;
388
+ /**
389
+ * Build an image
390
+ *
391
+ * @param stream - A tar archive compressed with one of the following
392
+ * algorithms: identity (no compression), gzip, bzip2, xz.
393
+ * @param dockerfile - Path within the build context to the `Dockerfile`.
394
+ * This is ignored if `remote` is specified and points to an external
395
+ * `Dockerfile`.
396
+ * @param t - A name and optional tag to apply to the image in the
397
+ * `name:tag` format. If you omit the tag the default `latest` value is
398
+ * assumed. You can provide several `t` parameters.
399
+ * @param extrahosts - Extra hosts to add to /etc/hosts
400
+ * @param remote - A Git repository URI or HTTP/HTTPS context URI. If the
401
+ * URI points to a single text file, the file’s contents are placed into a
402
+ * file called `Dockerfile` and the image is built from that file. If the
403
+ * URI points to a tarball, the file is downloaded by the daemon and the
404
+ * contents therein used as the context for the build. If the URI points
405
+ * to a tarball and the `dockerfile` parameter is also specified, there
406
+ * must be a file with the corresponding path inside the tarball.
407
+ * @param q - Suppress verbose build output.
408
+ * @param nocache - Do not use the cache when building the image.
409
+ * @param cachefrom - JSON array of images used for build cache resolution.
410
+ * @param pull - Attempt to pull the image even if an older image exists
411
+ * locally.
412
+ * @param rm - Remove intermediate containers after a successful build.
413
+ * @param forcerm - Always remove intermediate containers, even upon
414
+ * failure.
415
+ * @param memory - Set memory limit for build.
416
+ * @param memswap - Total memory (memory + swap). Set as `-1` to disable
417
+ * swap.
418
+ * @param cpushares - CPU shares (relative weight).
419
+ * @param cpusetcpus - CPUs in which to allow execution (e.g., `0-3`,
420
+ * `0,1`).
421
+ * @param cpuperiod - The length of a CPU period in microseconds.
422
+ * @param cpuquota - Microseconds of CPU time that the container can get in
423
+ * a CPU period.
424
+ * @param buildargs - JSON map of string pairs for build-time variables.
425
+ * Users pass these values at build-time. Docker uses the buildargs as the
426
+ * environment context for commands run via the `Dockerfile` RUN
427
+ * instruction, or for variable expansion in other `Dockerfile`
428
+ * instructions. This is not meant for passing secret values.
429
+ *
430
+ * For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in
431
+ * JSON. This would result in the query parameter
432
+ * `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI
433
+ * component encoded.
434
+ *
435
+ * [Read more about the buildargs
436
+ * instruction.](https://docs.docker.com/engine/reference/builder/#arg)
437
+ * @param shmsize - Size of `/dev/shm` in bytes. The size must be greater
438
+ * than 0. If omitted the system uses 64MB.
439
+ * @param squash - Squash the resulting images layers into a single layer.
440
+ * _(Experimental release only.)_
441
+ * @param labels - Arbitrary key/value labels to set on the image, as a JSON
442
+ * map of string pairs.
443
+ * @param networkmode - Sets the networking mode for the run commands during
444
+ * build. Supported standard values are: `bridge`, `host`, `none`, and
445
+ * `container:<name|id>`. Any other value is taken as a custom network's
446
+ * name or ID to which this container should connect to.
447
+ * @param Content-type -
448
+ * @param X-Registry-Config - This is a base64-encoded JSON object with auth
449
+ * configurations for multiple registries that a build may refer to.
450
+ *
451
+ * The key is a registry URL, and the value is an auth configuration object,
452
+ * [as described in the authentication section](#section/Authentication).
453
+ * For example:
454
+ *
455
+ * {
456
+ * "docker.example.com": {
457
+ * "username": "janedoe",
458
+ * "password": "hunter2"
459
+ * },
460
+ * "https://index.docker.io/v1/": {
461
+ * "username": "mobydock",
462
+ * "password": "conta1n3rize14"
463
+ * }
464
+ * }
465
+ *
466
+ * Only the registry domain name (and port if not the default 443) are
467
+ * required. However, for legacy reasons, the Docker Hub registry must be
468
+ * specified with both a `https://` prefix and a `/v1/` suffix even though
469
+ * Docker will prefer to use the v2 registry API.
470
+ * @param platform - Platform in the format os[/arch[/variant]]
471
+ * @param target - Target build stage
472
+ * @param outputs - BuildKit output configuration
473
+ */
474
+ readonly build: (options: ImageBuildOptions) => Effect.Effect<never, ImagesError, Stream.Stream<never, ImagesError, string>>;
475
+ /**
476
+ * Delete builder cache
477
+ *
478
+ * @param keep-storage - Amount of disk space in bytes to keep for cache
479
+ * @param all - Remove all types of build cache
480
+ * @param filters - A JSON encoded value of the filters (a
481
+ * `map[string][]string`) to process on the list of build cache objects.
482
+ *
483
+ * Available filters:
484
+ *
485
+ * - `until=<timestamp>` remove cache older than `<timestamp>`. The
486
+ * `<timestamp>` can be Unix timestamps, date formatted timestamps, or
487
+ * Go duration strings (e.g. `10m`, `1h30m`) computed relative to the
488
+ * daemon's local time.
489
+ * - `id=<id>`
490
+ * - `parent=<id>`
491
+ * - `type=<string>`
492
+ * - `description=<string>`
493
+ * - `inuse`
494
+ * - `shared`
495
+ * - `private`
496
+ */
497
+ readonly buildPrune: (options: BuildPruneOptions) => Effect.Effect<never, ImagesError, BuildPruneResponse>;
498
+ /**
499
+ * Create an image
500
+ *
501
+ * @param fromImage - Name of the image to pull. The name may include a tag
502
+ * or digest. This parameter may only be used when pulling an image. The
503
+ * pull is cancelled if the HTTP connection is closed.
504
+ * @param fromSrc - Source to import. The value may be a URL from which the
505
+ * image can be retrieved or `-` to read the image from the request body.
506
+ * This parameter may only be used when importing an image.
507
+ * @param repo - Repository name given to an image when it is imported. The
508
+ * repo may include a tag. This parameter may only be used when importing
509
+ * an image.
510
+ * @param tag - Tag or digest. If empty when pulling an image, this causes
511
+ * all tags for the given image to be pulled.
512
+ * @param message - Set commit message for imported image.
513
+ * @param inputImage - Image content if the value `-` has been specified in
514
+ * fromSrc query parameter
515
+ * @param X-Registry-Auth - A base64url-encoded auth configuration.
516
+ *
517
+ * Refer to the [authentication section](#section/Authentication) for
518
+ * details.
519
+ * @param changes - Apply `Dockerfile` instructions to the image that is
520
+ * created, for example: `changes=ENV DEBUG=true`. Note that `ENV
521
+ * DEBUG=true` should be URI component encoded.
522
+ *
523
+ * Supported `Dockerfile` instructions:
524
+ * `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
525
+ * @param platform - Platform in the format os[/arch[/variant]].
526
+ *
527
+ * When used in combination with the `fromImage` option, the daemon checks
528
+ * if the given image is present in the local image cache with the given
529
+ * OS and Architecture, and otherwise attempts to pull the image. If the
530
+ * option is not set, the host's native OS and Architecture are used. If
531
+ * the given image does not exist in the local image cache, the daemon
532
+ * attempts to pull the image with the host's native OS and Architecture.
533
+ * If the given image does exists in the local image cache, but its OS or
534
+ * architecture does not match, a warning is produced.
535
+ *
536
+ * When used with the `fromSrc` option to import an image from an archive,
537
+ * this option sets the platform information for the imported image. If
538
+ * the option is not set, the host's native OS and Architecture are used
539
+ * for the imported image.
540
+ */
541
+ readonly create: (options: ImageCreateOptions) => Effect.Effect<never, ImagesError, Stream.Stream<never, ImagesError, string>>;
542
+ /**
543
+ * Inspect an image
544
+ *
545
+ * @param name - Image name or id
546
+ */
547
+ readonly inspect: (options: ImageInspectOptions) => Effect.Effect<never, ImagesError, Readonly<ImageInspect>>;
548
+ /**
549
+ * Get the history of an image
550
+ *
551
+ * @param name - Image name or ID
552
+ */
553
+ readonly history: (options: ImageHistoryOptions) => Effect.Effect<never, ImagesError, Schema.Schema.To<typeof HistoryResponseItem>>;
554
+ /**
555
+ * Push an image
556
+ *
557
+ * @param name - Image name or ID.
558
+ * @param tag - The tag to associate with the image on the registry.
559
+ * @param X-Registry-Auth - A base64url-encoded auth configuration.
560
+ *
561
+ * Refer to the [authentication section](#section/Authentication) for
562
+ * details.
563
+ */
564
+ readonly push: (options: ImagePushOptions) => Effect.Effect<never, ImagesError, Stream.Stream<never, ImagesError, string>>;
565
+ /**
566
+ * Tag an image
567
+ *
568
+ * @param name - Image name or ID to tag.
569
+ * @param repo - The repository to tag in. For example,
570
+ * `someuser/someimage`.
571
+ * @param tag - The name of the new tag.
572
+ */
573
+ readonly tag: (options: ImageTagOptions) => Effect.Effect<never, ImagesError, void>;
574
+ /**
575
+ * Remove an image
576
+ *
577
+ * @param name - Image name or ID
578
+ * @param force - Remove the image even if it is being used by stopped
579
+ * containers or has other tags
580
+ * @param noprune - Do not delete untagged parent images
581
+ */
582
+ readonly delete: (options: ImageDeleteOptions) => Effect.Effect<never, ImagesError, Readonly<Array<ImageDeleteResponseItem>>>;
583
+ /**
584
+ * Search images
585
+ *
586
+ * @param term - Term to search
587
+ * @param limit - Maximum number of results to return
588
+ * @param filters - A JSON encoded value of the filters (a
589
+ * `map[string][]string`) to process on the images list. Available
590
+ * filters:
591
+ *
592
+ * - `is-automated=(true|false)` (deprecated, see below)
593
+ * - `is-official=(true|false)`
594
+ * - `stars=<number>` Matches images that has at least 'number' stars.
595
+ *
596
+ * The `is-automated` filter is deprecated. The `is_automated` field has
597
+ * been deprecated by Docker Hub's search API. Consequently, searching for
598
+ * `is-automated=true` will yield no results.
599
+ */
600
+ readonly search: (options: ImageSearchOptions) => Effect.Effect<never, ImagesError, Schema.Schema.To<typeof ImageSearchResponseItem>>;
601
+ /**
602
+ * Delete unused images
603
+ *
604
+ * @param filters - Filters to process on the prune list, encoded as JSON (a
605
+ * `map[string][]string`). Available filters:
606
+ *
607
+ * - `dangling=<boolean>` When set to `true` (or `1`), prune only unused _and_
608
+ * untagged images. When set to `false` (or `0`), all unused images
609
+ * are pruned.
610
+ * - `until=<string>` Prune images created before this timestamp. The
611
+ * `<timestamp>` can be Unix timestamps, date formatted timestamps, or
612
+ * Go duration strings (e.g. `10m`, `1h30m`) computed relative to the
613
+ * daemon machine’s time.
614
+ * - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or
615
+ * `label!=<key>=<value>`) Prune images with (or without, in case
616
+ * `label!=...` is used) the specified labels.
617
+ */
618
+ readonly prune: (options?: ImagePruneOptions | undefined) => Effect.Effect<never, ImagesError, ImagePruneResponse>;
619
+ /**
620
+ * Create a new image from a container
621
+ *
622
+ * @param containerConfig - The container configuration
623
+ * @param container - The ID or name of the container to commit
624
+ * @param repo - Repository name for the created image
625
+ * @param tag - Tag name for the create image
626
+ * @param comment - Commit message
627
+ * @param author - Author of the image (e.g., `John Hannibal Smith
628
+ * <hannibal@a-team.com>`)
629
+ * @param pause - Whether to pause the container before committing
630
+ * @param changes - `Dockerfile` instructions to apply while committing
631
+ */
632
+ readonly commit: (options: ImageCommitOptions) => Effect.Effect<never, ImagesError, Readonly<IdResponse>>;
633
+ /**
634
+ * Export an image
635
+ *
636
+ * @param name - Image name or ID
637
+ */
638
+ readonly get: (options: ImageGetOptions) => Effect.Effect<never, ImagesError, Stream.Stream<never, ImagesError, string>>;
639
+ /**
640
+ * Export several images
641
+ *
642
+ * @param names - Image names to filter by
643
+ */
644
+ readonly getall: (options: ImageGetAllOptions) => Effect.Effect<never, ImagesError, Stream.Stream<never, ImagesError, string>>;
645
+ /**
646
+ * Import images
647
+ *
648
+ * @param imagesTarball - Tar archive containing images
649
+ * @param quiet - Suppress progress details during load.
650
+ */
651
+ readonly load: (options: ImageLoadOptions) => Effect.Effect<never, ImagesError, void>;
652
+ }
653
+ export declare const Images: Context.Tag<Images, Images>;
654
+ export declare const layer: Layer.Layer<IMobyConnectionAgent, never, Images>;
655
+ export declare const fromAgent: (agent: Effect.Effect<Scope.Scope, never, IMobyConnectionAgent>) => Layer.Layer<never, never, Images>;
656
+ export declare const fromConnectionOptions: (connectionOptions: MobyConnectionOptions) => Layer.Layer<never, never, Images>;
657
+ export {};