the-moby-effect 1.45.0-alpha.12 → 1.45.0-alpha.13
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.
- package/Engines/package.json +6 -0
- package/dist/cjs/Connection.js +0 -1
- package/dist/cjs/Connection.js.map +1 -1
- package/dist/cjs/Demux.js +11 -0
- package/dist/cjs/Demux.js.map +1 -1
- package/dist/cjs/Endpoints.js +13 -0
- package/dist/cjs/Endpoints.js.map +1 -1
- package/dist/cjs/Engines.js +17 -0
- package/dist/cjs/Engines.js.map +1 -0
- package/dist/cjs/Platforms.js +1 -1
- package/dist/cjs/archive/Tar.js +1 -1
- package/dist/cjs/archive/Tar.js.map +1 -1
- package/dist/cjs/blobs/Http.js +1 -1
- package/dist/cjs/blobs/Http.js.map +1 -1
- package/dist/cjs/blobs/Https.js +1 -1
- package/dist/cjs/blobs/Https.js.map +1 -1
- package/dist/cjs/blobs/Socket.js +1 -1
- package/dist/cjs/blobs/Socket.js.map +1 -1
- package/dist/cjs/blobs/Ssh.js +1 -1
- package/dist/cjs/blobs/Ssh.js.map +1 -1
- package/dist/cjs/demux/Compressed.js.map +1 -1
- package/dist/cjs/demux/Demux.js +79 -60
- package/dist/cjs/demux/Demux.js.map +1 -1
- package/dist/cjs/demux/Hijack.js +20 -29
- package/dist/cjs/demux/Hijack.js.map +1 -1
- package/dist/cjs/demux/Multiplexed.js +2 -3
- package/dist/cjs/demux/Multiplexed.js.map +1 -1
- package/dist/cjs/demux/Raw.js +27 -80
- package/dist/cjs/demux/Raw.js.map +1 -1
- package/dist/cjs/demux/Stdio.js +20 -18
- package/dist/cjs/demux/Stdio.js.map +1 -1
- package/dist/cjs/endpoints/Common.js +0 -2
- package/dist/cjs/endpoints/Common.js.map +1 -1
- package/dist/cjs/endpoints/Containers.js +4 -4
- package/dist/cjs/endpoints/Containers.js.map +1 -1
- package/dist/cjs/endpoints/Distribution.js +2 -0
- package/dist/cjs/endpoints/Distribution.js.map +1 -1
- package/dist/cjs/endpoints/Execs.js +2 -0
- package/dist/cjs/endpoints/Execs.js.map +1 -1
- package/dist/cjs/endpoints/Images.js +4 -4
- package/dist/cjs/endpoints/Images.js.map +1 -1
- package/dist/cjs/endpoints/Networks.js +2 -0
- package/dist/cjs/endpoints/Networks.js.map +1 -1
- package/dist/cjs/endpoints/Nodes.js +2 -0
- package/dist/cjs/endpoints/Nodes.js.map +1 -1
- package/dist/cjs/endpoints/Plugins.js +2 -0
- package/dist/cjs/endpoints/Plugins.js.map +1 -1
- package/dist/cjs/endpoints/Secrets.js +2 -0
- package/dist/cjs/endpoints/Secrets.js.map +1 -1
- package/dist/cjs/endpoints/Services.js +2 -0
- package/dist/cjs/endpoints/Services.js.map +1 -1
- package/dist/cjs/endpoints/Session.js +15 -3
- package/dist/cjs/endpoints/Session.js.map +1 -1
- package/dist/cjs/endpoints/Swarm.js +2 -0
- package/dist/cjs/endpoints/Swarm.js.map +1 -1
- package/dist/cjs/endpoints/System.js +2 -0
- package/dist/cjs/endpoints/System.js.map +1 -1
- package/dist/cjs/endpoints/Tasks.js +2 -0
- package/dist/cjs/endpoints/Tasks.js.map +1 -1
- package/dist/cjs/endpoints/Volumes.js +2 -0
- package/dist/cjs/endpoints/Volumes.js.map +1 -1
- package/dist/cjs/engines/Docker.js +61 -12
- package/dist/cjs/engines/Docker.js.map +1 -1
- package/dist/cjs/engines/Moby.js +1 -1
- package/dist/cjs/generated/ImagePruneResponse.generated.js +3 -1
- package/dist/cjs/generated/ImagePruneResponse.generated.js.map +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/dts/Connection.d.ts.map +1 -1
- package/dist/dts/Demux.d.ts +9 -0
- package/dist/dts/Demux.d.ts.map +1 -1
- package/dist/dts/DockerEngine.d.ts +1 -1
- package/dist/dts/Endpoints.d.ts +11 -0
- package/dist/dts/Endpoints.d.ts.map +1 -1
- package/dist/dts/Engines.d.ts +30 -0
- package/dist/dts/Engines.d.ts.map +1 -0
- package/dist/dts/Platforms.d.ts +1 -1
- package/dist/dts/demux/Compressed.d.ts +7 -0
- package/dist/dts/demux/Compressed.d.ts.map +1 -1
- package/dist/dts/demux/Demux.d.ts +145 -239
- package/dist/dts/demux/Demux.d.ts.map +1 -1
- package/dist/dts/demux/Hijack.d.ts +3 -19
- package/dist/dts/demux/Hijack.d.ts.map +1 -1
- package/dist/dts/demux/Multiplexed.d.ts +2 -3
- package/dist/dts/demux/Multiplexed.d.ts.map +1 -1
- package/dist/dts/demux/Raw.d.ts +25 -186
- package/dist/dts/demux/Raw.d.ts.map +1 -1
- package/dist/dts/demux/Stdio.d.ts +23 -35
- package/dist/dts/demux/Stdio.d.ts.map +1 -1
- package/dist/dts/endpoints/Containers.d.ts +5 -3
- package/dist/dts/endpoints/Containers.d.ts.map +1 -1
- package/dist/dts/endpoints/Distribution.d.ts +2 -0
- package/dist/dts/endpoints/Distribution.d.ts.map +1 -1
- package/dist/dts/endpoints/Execs.d.ts +7 -5
- package/dist/dts/endpoints/Execs.d.ts.map +1 -1
- package/dist/dts/endpoints/Images.d.ts +170 -592
- package/dist/dts/endpoints/Images.d.ts.map +1 -1
- package/dist/dts/endpoints/Networks.d.ts +24 -151
- package/dist/dts/endpoints/Networks.d.ts.map +1 -1
- package/dist/dts/endpoints/Nodes.d.ts +24 -80
- package/dist/dts/endpoints/Nodes.d.ts.map +1 -1
- package/dist/dts/endpoints/Plugins.d.ts +49 -296
- package/dist/dts/endpoints/Plugins.d.ts.map +1 -1
- package/dist/dts/endpoints/Secrets.d.ts +16 -109
- package/dist/dts/endpoints/Secrets.d.ts.map +1 -1
- package/dist/dts/endpoints/Services.d.ts +57 -205
- package/dist/dts/endpoints/Services.d.ts.map +1 -1
- package/dist/dts/endpoints/Session.d.ts +2 -17
- package/dist/dts/endpoints/Session.d.ts.map +1 -1
- package/dist/dts/endpoints/Swarm.d.ts +16 -69
- package/dist/dts/endpoints/Swarm.d.ts.map +1 -1
- package/dist/dts/endpoints/System.d.ts +25 -106
- package/dist/dts/endpoints/System.d.ts.map +1 -1
- package/dist/dts/endpoints/Tasks.d.ts +25 -105
- package/dist/dts/endpoints/Tasks.d.ts.map +1 -1
- package/dist/dts/endpoints/Volumes.d.ts +28 -137
- package/dist/dts/endpoints/Volumes.d.ts.map +1 -1
- package/dist/dts/engines/Docker.d.ts +21 -4
- package/dist/dts/engines/Docker.d.ts.map +1 -1
- package/dist/dts/engines/DockerCompose.d.ts +2 -0
- package/dist/dts/engines/DockerCompose.d.ts.map +1 -1
- package/dist/dts/engines/Moby.d.ts +1 -1
- package/dist/dts/generated/ClusterVolumeSpec.generated.d.ts +1 -1
- package/dist/dts/generated/ImagePruneResponse.generated.d.ts +7 -3
- package/dist/dts/generated/ImagePruneResponse.generated.d.ts.map +1 -1
- package/dist/dts/generated/SwarmInitRequest.generated.d.ts +1 -1
- package/dist/dts/generated/SwarmJoinRequest.generated.d.ts +1 -1
- package/dist/dts/index.d.ts +5 -5
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/esm/Connection.js +0 -1
- package/dist/esm/Connection.js.map +1 -1
- package/dist/esm/Demux.js +9 -0
- package/dist/esm/Demux.js.map +1 -1
- package/dist/esm/DockerEngine.js +1 -1
- package/dist/esm/Endpoints.js +11 -0
- package/dist/esm/Endpoints.js.map +1 -1
- package/dist/esm/Engines.js +30 -0
- package/dist/esm/Engines.js.map +1 -0
- package/dist/esm/Platforms.js +1 -1
- package/dist/esm/archive/Tar.js +1 -1
- package/dist/esm/archive/Tar.js.map +1 -1
- package/dist/esm/blobs/Http.js +1 -1
- package/dist/esm/blobs/Http.js.map +1 -1
- package/dist/esm/blobs/Https.js +1 -1
- package/dist/esm/blobs/Https.js.map +1 -1
- package/dist/esm/blobs/Socket.js +1 -1
- package/dist/esm/blobs/Socket.js.map +1 -1
- package/dist/esm/blobs/Ssh.js +1 -1
- package/dist/esm/blobs/Ssh.js.map +1 -1
- package/dist/esm/demux/Compressed.js.map +1 -1
- package/dist/esm/demux/Demux.js +79 -60
- package/dist/esm/demux/Demux.js.map +1 -1
- package/dist/esm/demux/Hijack.js +19 -30
- package/dist/esm/demux/Hijack.js.map +1 -1
- package/dist/esm/demux/Multiplexed.js +2 -3
- package/dist/esm/demux/Multiplexed.js.map +1 -1
- package/dist/esm/demux/Raw.js +24 -73
- package/dist/esm/demux/Raw.js.map +1 -1
- package/dist/esm/demux/Stdio.js +20 -18
- package/dist/esm/demux/Stdio.js.map +1 -1
- package/dist/esm/endpoints/Common.js +0 -2
- package/dist/esm/endpoints/Common.js.map +1 -1
- package/dist/esm/endpoints/Containers.js +5 -5
- package/dist/esm/endpoints/Containers.js.map +1 -1
- package/dist/esm/endpoints/Distribution.js +2 -0
- package/dist/esm/endpoints/Distribution.js.map +1 -1
- package/dist/esm/endpoints/Execs.js +2 -0
- package/dist/esm/endpoints/Execs.js.map +1 -1
- package/dist/esm/endpoints/Images.js +4 -4
- package/dist/esm/endpoints/Images.js.map +1 -1
- package/dist/esm/endpoints/Networks.js +2 -0
- package/dist/esm/endpoints/Networks.js.map +1 -1
- package/dist/esm/endpoints/Nodes.js +2 -0
- package/dist/esm/endpoints/Nodes.js.map +1 -1
- package/dist/esm/endpoints/Plugins.js +2 -0
- package/dist/esm/endpoints/Plugins.js.map +1 -1
- package/dist/esm/endpoints/Secrets.js +2 -0
- package/dist/esm/endpoints/Secrets.js.map +1 -1
- package/dist/esm/endpoints/Services.js +2 -0
- package/dist/esm/endpoints/Services.js.map +1 -1
- package/dist/esm/endpoints/Session.js +15 -3
- package/dist/esm/endpoints/Session.js.map +1 -1
- package/dist/esm/endpoints/Swarm.js +2 -0
- package/dist/esm/endpoints/Swarm.js.map +1 -1
- package/dist/esm/endpoints/System.js +2 -0
- package/dist/esm/endpoints/System.js.map +1 -1
- package/dist/esm/endpoints/Tasks.js +2 -0
- package/dist/esm/endpoints/Tasks.js.map +1 -1
- package/dist/esm/endpoints/Volumes.js +2 -0
- package/dist/esm/endpoints/Volumes.js.map +1 -1
- package/dist/esm/engines/Docker.js +57 -10
- package/dist/esm/engines/Docker.js.map +1 -1
- package/dist/esm/engines/Moby.js +1 -1
- package/dist/esm/generated/ImagePruneResponse.generated.js +3 -1
- package/dist/esm/generated/ImagePruneResponse.generated.js.map +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/package.json +14 -14
- package/src/Connection.ts +0 -1
- package/src/Demux.ts +10 -0
- package/src/DockerEngine.ts +1 -1
- package/src/Endpoints.ts +13 -0
- package/src/Engines.ts +33 -0
- package/src/Platforms.ts +1 -1
- package/src/archive/Tar.ts +1 -1
- package/src/blobs/Http.ts +1 -1
- package/src/blobs/Https.ts +1 -1
- package/src/blobs/Socket.ts +1 -1
- package/src/blobs/Ssh.ts +1 -1
- package/src/demux/Compressed.ts +19 -0
- package/src/demux/Demux.ts +191 -288
- package/src/demux/Hijack.ts +33 -189
- package/src/demux/Multiplexed.ts +2 -3
- package/src/demux/Raw.ts +69 -247
- package/src/demux/Stdio.ts +31 -86
- package/src/endpoints/Common.ts +0 -2
- package/src/endpoints/Containers.ts +8 -9
- package/src/endpoints/Distribution.ts +3 -0
- package/src/endpoints/Execs.ts +11 -6
- package/src/endpoints/Images.ts +179 -638
- package/src/endpoints/Networks.ts +19 -166
- package/src/endpoints/Nodes.ts +25 -90
- package/src/endpoints/Plugins.ts +43 -321
- package/src/endpoints/Secrets.ts +13 -122
- package/src/endpoints/Services.ts +53 -229
- package/src/endpoints/Session.ts +16 -20
- package/src/endpoints/Swarm.ts +17 -78
- package/src/endpoints/System.ts +30 -116
- package/src/endpoints/Tasks.ts +26 -113
- package/src/endpoints/Volumes.ts +33 -145
- package/src/engines/Docker.ts +72 -13
- package/src/engines/DockerCompose.ts +2 -0
- package/src/engines/Moby.ts +1 -1
- package/src/generated/ImagePruneResponse.generated.ts +1 -1
- package/src/index.ts +5 -5
- package/PodmanEngine/package.json +0 -6
- package/dist/cjs/PodmanEngine.js +0 -17
- package/dist/cjs/PodmanEngine.js.map +0 -1
- package/dist/dts/PodmanEngine.d.ts +0 -7
- package/dist/dts/PodmanEngine.d.ts.map +0 -1
- package/dist/esm/PodmanEngine.js +0 -7
- package/dist/esm/PodmanEngine.js.map +0 -1
- package/src/PodmanEngine.ts +0 -7
package/src/endpoints/Images.ts
CHANGED
|
@@ -64,36 +64,6 @@ export class ImagesError extends PlatformError.TypeIdError(ImagesErrorTypeId, "I
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
/**
|
|
68
|
-
* @since 1.0.0
|
|
69
|
-
* @category Params
|
|
70
|
-
*/
|
|
71
|
-
export interface ImageListOptions {
|
|
72
|
-
/**
|
|
73
|
-
* Show all images. Only images from a final layer (no children) are shown
|
|
74
|
-
* by default.
|
|
75
|
-
*/
|
|
76
|
-
readonly all?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* A JSON encoded value of the filters (a `map[string][]string`) to process
|
|
79
|
-
* on the images list.
|
|
80
|
-
*
|
|
81
|
-
* Available filters:
|
|
82
|
-
*
|
|
83
|
-
* - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
|
|
84
|
-
* - `dangling=true`
|
|
85
|
-
* - `label=key` or `label="key=value"` of an image label
|
|
86
|
-
* - `reference`=(`<image-name>[:<tag>]`)
|
|
87
|
-
* - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
|
|
88
|
-
* - `until=<timestamp>`
|
|
89
|
-
*/
|
|
90
|
-
readonly filters?: string | undefined;
|
|
91
|
-
/** Compute and show shared size as a `SharedSize` field on each image. */
|
|
92
|
-
readonly "shared-size"?: boolean | undefined;
|
|
93
|
-
/** Show digest information as a `RepoDigests` field on each image. */
|
|
94
|
-
readonly digests?: boolean | undefined;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
67
|
/**
|
|
98
68
|
* @since 1.0.0
|
|
99
69
|
* @category Params
|
|
@@ -222,592 +192,6 @@ export interface ImageBuildOptions<E1> {
|
|
|
222
192
|
readonly outputs?: string | undefined;
|
|
223
193
|
}
|
|
224
194
|
|
|
225
|
-
/**
|
|
226
|
-
* @since 1.0.0
|
|
227
|
-
* @category Params
|
|
228
|
-
*/
|
|
229
|
-
export interface BuildPruneOptions {
|
|
230
|
-
/** Amount of disk space in bytes to keep for cache */
|
|
231
|
-
readonly "keep-storage"?: number;
|
|
232
|
-
/** Remove all types of build cache */
|
|
233
|
-
readonly all?: boolean;
|
|
234
|
-
/**
|
|
235
|
-
* A JSON encoded value of the filters (a `map[string][]string`) to process
|
|
236
|
-
* on the list of build cache objects.
|
|
237
|
-
*
|
|
238
|
-
* Available filters:
|
|
239
|
-
*
|
|
240
|
-
* - `until=<timestamp>` remove cache older than `<timestamp>`. The
|
|
241
|
-
* `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go
|
|
242
|
-
* duration strings (e.g. `10m`, `1h30m`) computed relative to the
|
|
243
|
-
* daemon's local time.
|
|
244
|
-
* - `id=<id>`
|
|
245
|
-
* - `parent=<id>`
|
|
246
|
-
* - `type=<string>`
|
|
247
|
-
* - `description=<string>`
|
|
248
|
-
* - `inuse`
|
|
249
|
-
* - `shared`
|
|
250
|
-
* - `private`
|
|
251
|
-
*/
|
|
252
|
-
readonly filters?:
|
|
253
|
-
| {
|
|
254
|
-
until?: string | undefined;
|
|
255
|
-
id?: string | undefined;
|
|
256
|
-
parent?: string | undefined;
|
|
257
|
-
type?: string | undefined;
|
|
258
|
-
description?: string | undefined;
|
|
259
|
-
inuse?: boolean | undefined;
|
|
260
|
-
shared?: boolean | undefined;
|
|
261
|
-
private?: boolean | undefined;
|
|
262
|
-
}
|
|
263
|
-
| undefined;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* @since 1.0.0
|
|
268
|
-
* @category Params
|
|
269
|
-
*/
|
|
270
|
-
export interface ImageCreateOptions {
|
|
271
|
-
/**
|
|
272
|
-
* Name of the image to pull. The name may include a tag or digest. This
|
|
273
|
-
* parameter may only be used when pulling an image. The pull is cancelled
|
|
274
|
-
* if the HTTP connection is closed.
|
|
275
|
-
*/
|
|
276
|
-
readonly fromImage?: string | undefined;
|
|
277
|
-
/**
|
|
278
|
-
* Source to import. The value may be a URL from which the image can be
|
|
279
|
-
* retrieved or `-` to read the image from the request body. This parameter
|
|
280
|
-
* may only be used when importing an image.
|
|
281
|
-
*/
|
|
282
|
-
readonly fromSrc?: string | undefined;
|
|
283
|
-
/**
|
|
284
|
-
* Repository name given to an image when it is imported. The repo may
|
|
285
|
-
* include a tag. This parameter may only be used when importing an image.
|
|
286
|
-
*/
|
|
287
|
-
readonly repo?: string | undefined;
|
|
288
|
-
/**
|
|
289
|
-
* Tag or digest. If empty when pulling an image, this causes all tags for
|
|
290
|
-
* the given image to be pulled.
|
|
291
|
-
*/
|
|
292
|
-
readonly tag?: string | undefined;
|
|
293
|
-
/** Set commit message for imported image. */
|
|
294
|
-
readonly message?: string | undefined;
|
|
295
|
-
/**
|
|
296
|
-
* Image content if the value `-` has been specified in fromSrc query
|
|
297
|
-
* parameter
|
|
298
|
-
*/
|
|
299
|
-
readonly inputImage?: string | undefined;
|
|
300
|
-
/**
|
|
301
|
-
* A base64url-encoded auth configuration.
|
|
302
|
-
*
|
|
303
|
-
* Refer to the [authentication section](#section/Authentication) for
|
|
304
|
-
* details.
|
|
305
|
-
*/
|
|
306
|
-
readonly "X-Registry-Auth"?: string | undefined;
|
|
307
|
-
/**
|
|
308
|
-
* Apply `Dockerfile` instructions to the image that is created, for
|
|
309
|
-
* example: `changes=ENV DEBUG=true`. Note that `ENV DEBUG=true` should be
|
|
310
|
-
* URI component encoded.
|
|
311
|
-
*
|
|
312
|
-
* Supported `Dockerfile` instructions:
|
|
313
|
-
* `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
|
|
314
|
-
*/
|
|
315
|
-
readonly changes?: string | undefined;
|
|
316
|
-
/**
|
|
317
|
-
* Platform in the format os[/arch[/variant]].
|
|
318
|
-
*
|
|
319
|
-
* When used in combination with the `fromImage` option, the daemon checks
|
|
320
|
-
* if the given image is present in the local image cache with the given OS
|
|
321
|
-
* and Architecture, and otherwise attempts to pull the image. If the option
|
|
322
|
-
* is not set, the host's native OS and Architecture are used. If the given
|
|
323
|
-
* image does not exist in the local image cache, the daemon attempts to
|
|
324
|
-
* pull the image with the host's native OS and Architecture. If the given
|
|
325
|
-
* image does exists in the local image cache, but its OS or architecture
|
|
326
|
-
* does not match, a warning is produced.
|
|
327
|
-
*
|
|
328
|
-
* When used with the `fromSrc` option to import an image from an archive,
|
|
329
|
-
* this option sets the platform information for the imported image. If the
|
|
330
|
-
* option is not set, the host's native OS and Architecture are used for the
|
|
331
|
-
* imported image.
|
|
332
|
-
*/
|
|
333
|
-
readonly platform?: string | undefined;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* @since 1.0.0
|
|
338
|
-
* @category Params
|
|
339
|
-
*/
|
|
340
|
-
export interface ImageInspectOptions {
|
|
341
|
-
/** Image name or id */
|
|
342
|
-
readonly name: string;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* @since 1.0.0
|
|
347
|
-
* @category Params
|
|
348
|
-
*/
|
|
349
|
-
export interface ImageHistoryOptions {
|
|
350
|
-
/** Image name or ID */
|
|
351
|
-
readonly name: string;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* @since 1.0.0
|
|
356
|
-
* @category Params
|
|
357
|
-
*/
|
|
358
|
-
export interface ImagePushOptions {
|
|
359
|
-
/** Image name or ID. */
|
|
360
|
-
readonly name: string;
|
|
361
|
-
/** The tag to associate with the image on the registry. */
|
|
362
|
-
readonly tag?: string;
|
|
363
|
-
/**
|
|
364
|
-
* A base64url-encoded auth configuration.
|
|
365
|
-
*
|
|
366
|
-
* Refer to the [authentication section](#section/Authentication) for
|
|
367
|
-
* details.
|
|
368
|
-
*/
|
|
369
|
-
readonly "X-Registry-Auth": string;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* @since 1.0.0
|
|
374
|
-
* @category Params
|
|
375
|
-
*/
|
|
376
|
-
export interface ImageTagOptions {
|
|
377
|
-
/** Image name or ID to tag. */
|
|
378
|
-
readonly name: string;
|
|
379
|
-
/** The repository to tag in. For example, `someuser/someimage`. */
|
|
380
|
-
readonly repo?: string;
|
|
381
|
-
/** The name of the new tag. */
|
|
382
|
-
readonly tag?: string;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* @since 1.0.0
|
|
387
|
-
* @category Params
|
|
388
|
-
*/
|
|
389
|
-
export interface ImageDeleteOptions {
|
|
390
|
-
/** Image name or ID */
|
|
391
|
-
readonly name: string;
|
|
392
|
-
/**
|
|
393
|
-
* Remove the image even if it is being used by stopped containers or has
|
|
394
|
-
* other tags
|
|
395
|
-
*/
|
|
396
|
-
readonly force?: boolean;
|
|
397
|
-
/** Do not delete untagged parent images */
|
|
398
|
-
readonly noprune?: boolean;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* @since 1.0.0
|
|
403
|
-
* @category Params
|
|
404
|
-
*/
|
|
405
|
-
export interface ImageSearchOptions {
|
|
406
|
-
/** Term to search */
|
|
407
|
-
readonly term: string;
|
|
408
|
-
/** Maximum number of results to return */
|
|
409
|
-
readonly limit?: number | undefined;
|
|
410
|
-
/** Matches images that have at least this many stars */
|
|
411
|
-
readonly stars?: number | undefined;
|
|
412
|
-
/** Filters for only official images */
|
|
413
|
-
readonly "is-official"?: boolean | undefined;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* @since 1.0.0
|
|
418
|
-
* @category Params
|
|
419
|
-
*/
|
|
420
|
-
export interface ImagePruneOptions {
|
|
421
|
-
/**
|
|
422
|
-
* Filters to process on the prune list, encoded as JSON (a
|
|
423
|
-
* `map[string][]string`). Available filters:
|
|
424
|
-
*
|
|
425
|
-
* - `dangling=<boolean>` When set to `true` (or `1`), prune only unused _and_
|
|
426
|
-
* untagged images. When set to `false` (or `0`), all unused images are
|
|
427
|
-
* pruned.
|
|
428
|
-
* - `until=<string>` Prune images created before this timestamp. The
|
|
429
|
-
* `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go
|
|
430
|
-
* duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon
|
|
431
|
-
* machine’s time.
|
|
432
|
-
* - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or
|
|
433
|
-
* `label!=<key>=<value>`) Prune images with (or without, in case
|
|
434
|
-
* `label!=...` is used) the specified labels.
|
|
435
|
-
*/
|
|
436
|
-
readonly filters?: {
|
|
437
|
-
dangling?: ["true" | "false"] | undefined;
|
|
438
|
-
until?: [string] | undefined;
|
|
439
|
-
label?: Array<string> | undefined;
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* @since 1.0.0
|
|
445
|
-
* @category Params
|
|
446
|
-
*/
|
|
447
|
-
export interface ImageCommitOptions {
|
|
448
|
-
/** The container configuration */
|
|
449
|
-
readonly containerConfig: ContainerConfig;
|
|
450
|
-
/** The ID or name of the container to commit */
|
|
451
|
-
readonly container?: string;
|
|
452
|
-
/** Repository name for the created image */
|
|
453
|
-
readonly repo?: string;
|
|
454
|
-
/** Tag name for the create image */
|
|
455
|
-
readonly tag?: string;
|
|
456
|
-
/** Commit message */
|
|
457
|
-
readonly comment?: string;
|
|
458
|
-
/** Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`) */
|
|
459
|
-
readonly author?: string;
|
|
460
|
-
/** Whether to pause the container before committing */
|
|
461
|
-
readonly pause?: boolean;
|
|
462
|
-
/** `Dockerfile` instructions to apply while committing */
|
|
463
|
-
readonly changes?: string;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* @since 1.0.0
|
|
468
|
-
* @category Params
|
|
469
|
-
*/
|
|
470
|
-
export interface ImageGetOptions {
|
|
471
|
-
/** Image name or ID */
|
|
472
|
-
readonly name: string;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* @since 1.0.0
|
|
477
|
-
* @category Params
|
|
478
|
-
*/
|
|
479
|
-
export interface ImageGetAllOptions {
|
|
480
|
-
/** Image names to filter by */
|
|
481
|
-
readonly names?: Array<string> | undefined;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
/**
|
|
485
|
-
* @since 1.0.0
|
|
486
|
-
* @category Params
|
|
487
|
-
*/
|
|
488
|
-
export interface ImageLoadOptions<E1> {
|
|
489
|
-
/** Tar archive containing images */
|
|
490
|
-
readonly imagesTarball: Stream.Stream<Uint8Array, E1, never>;
|
|
491
|
-
/** Suppress progress details during load. */
|
|
492
|
-
readonly quiet?: boolean;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* @since 1.0.0
|
|
497
|
-
* @category Tags
|
|
498
|
-
*/
|
|
499
|
-
export interface ImagesImpl {
|
|
500
|
-
/**
|
|
501
|
-
* List Images
|
|
502
|
-
*
|
|
503
|
-
* @param all - Show all images. Only images from a final layer (no
|
|
504
|
-
* children) are shown by default.
|
|
505
|
-
* @param filters - A JSON encoded value of the filters (a
|
|
506
|
-
* `map[string][]string`) to process on the images list.
|
|
507
|
-
*
|
|
508
|
-
* Available filters:
|
|
509
|
-
*
|
|
510
|
-
* - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
|
|
511
|
-
* - `dangling=true`
|
|
512
|
-
* - `label=key` or `label="key=value"` of an image label
|
|
513
|
-
* - `reference`=(`<image-name>[:<tag>]`)
|
|
514
|
-
* - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
|
|
515
|
-
* - `until=<timestamp>`
|
|
516
|
-
*
|
|
517
|
-
* @param shared-size - Compute and show shared size as a `SharedSize` field
|
|
518
|
-
* on each image.
|
|
519
|
-
* @param digests - Show digest information as a `RepoDigests` field on each
|
|
520
|
-
* image.
|
|
521
|
-
*/
|
|
522
|
-
readonly list: (
|
|
523
|
-
options?: ImageListOptions | undefined
|
|
524
|
-
) => Effect.Effect<ReadonlyArray<ImageSummary>, ImagesError, never>;
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Build an image
|
|
528
|
-
*
|
|
529
|
-
* @param context - A tar archive compressed with one of the following
|
|
530
|
-
* algorithms: identity (no compression), gzip, bzip2, xz.
|
|
531
|
-
* @param dockerfile - Path within the build context to the `Dockerfile`.
|
|
532
|
-
* This is ignored if `remote` is specified and points to an external
|
|
533
|
-
* `Dockerfile`.
|
|
534
|
-
* @param t - A name and optional tag to apply to the image in the
|
|
535
|
-
* `name:tag` format. If you omit the tag the default `latest` value is
|
|
536
|
-
* assumed. You can provide several `t` parameters.
|
|
537
|
-
* @param extrahosts - Extra hosts to add to /etc/hosts
|
|
538
|
-
* @param remote - A Git repository URI or HTTP/HTTPS context URI. If the
|
|
539
|
-
* URI points to a single text file, the file’s contents are placed into a
|
|
540
|
-
* file called `Dockerfile` and the image is built from that file. If the
|
|
541
|
-
* URI points to a tarball, the file is downloaded by the daemon and the
|
|
542
|
-
* contents therein used as the context for the build. If the URI points
|
|
543
|
-
* to a tarball and the `dockerfile` parameter is also specified, there
|
|
544
|
-
* must be a file with the corresponding path inside the tarball.
|
|
545
|
-
* @param q - Suppress verbose build output.
|
|
546
|
-
* @param nocache - Do not use the cache when building the image.
|
|
547
|
-
* @param cachefrom - JSON array of images used for build cache resolution.
|
|
548
|
-
* @param pull - Attempt to pull the image even if an older image exists
|
|
549
|
-
* locally.
|
|
550
|
-
* @param rm - Remove intermediate containers after a successful build.
|
|
551
|
-
* @param forcerm - Always remove intermediate containers, even upon
|
|
552
|
-
* failure.
|
|
553
|
-
* @param memory - Set memory limit for build.
|
|
554
|
-
* @param memswap - Total memory (memory + swap). Set as `-1` to disable
|
|
555
|
-
* swap.
|
|
556
|
-
* @param cpushares - CPU shares (relative weight).
|
|
557
|
-
* @param cpusetcpus - CPUs in which to allow execution (e.g., `0-3`,
|
|
558
|
-
* `0,1`).
|
|
559
|
-
* @param cpuperiod - The length of a CPU period in microseconds.
|
|
560
|
-
* @param cpuquota - Microseconds of CPU time that the container can get in
|
|
561
|
-
* a CPU period.
|
|
562
|
-
* @param buildargs - JSON map of string pairs for build-time variables.
|
|
563
|
-
* Users pass these values at build-time. Docker uses the buildargs as the
|
|
564
|
-
* environment context for commands run via the `Dockerfile` RUN
|
|
565
|
-
* instruction, or for variable expansion in other `Dockerfile`
|
|
566
|
-
* instructions. This is not meant for passing secret values.
|
|
567
|
-
*
|
|
568
|
-
* For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in
|
|
569
|
-
* JSON. This would result in the query parameter
|
|
570
|
-
* `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI
|
|
571
|
-
* component encoded.
|
|
572
|
-
*
|
|
573
|
-
* [Read more about the buildargs
|
|
574
|
-
* instruction.](https://docs.docker.com/engine/reference/builder/#arg)
|
|
575
|
-
* @param shmsize - Size of `/dev/shm` in bytes. The size must be greater
|
|
576
|
-
* than 0. If omitted the system uses 64MB.
|
|
577
|
-
* @param squash - Squash the resulting images layers into a single layer.
|
|
578
|
-
* _(Experimental release only.)_
|
|
579
|
-
* @param labels - Arbitrary key/value labels to set on the image, as a JSON
|
|
580
|
-
* map of string pairs.
|
|
581
|
-
* @param networkmode - Sets the networking mode for the run commands during
|
|
582
|
-
* build. Supported standard values are: `bridge`, `host`, `none`, and
|
|
583
|
-
* `container:<name|id>`. Any other value is taken as a custom network's
|
|
584
|
-
* name or ID to which this container should connect to.
|
|
585
|
-
* @param Content-type -
|
|
586
|
-
* @param X-Registry-Config - This is a base64-encoded JSON object with auth
|
|
587
|
-
* configurations for multiple registries that a build may refer to.
|
|
588
|
-
*
|
|
589
|
-
* The key is a registry URL, and the value is an auth configuration object,
|
|
590
|
-
* [as described in the authentication section](#section/Authentication).
|
|
591
|
-
* For example:
|
|
592
|
-
*
|
|
593
|
-
* {
|
|
594
|
-
* "docker.example.com": {
|
|
595
|
-
* "username": "janedoe",
|
|
596
|
-
* "password": "hunter2"
|
|
597
|
-
* },
|
|
598
|
-
* "https://index.docker.io/v1/": {
|
|
599
|
-
* "username": "mobydock",
|
|
600
|
-
* "password": "conta1n3rize14"
|
|
601
|
-
* }
|
|
602
|
-
* }
|
|
603
|
-
*
|
|
604
|
-
* Only the registry domain name (and port if not the default 443) are
|
|
605
|
-
* required. However, for legacy reasons, the Docker Hub registry must be
|
|
606
|
-
* specified with both a `https://` prefix and a `/v1/` suffix even though
|
|
607
|
-
* Docker will prefer to use the v2 registry API.
|
|
608
|
-
* @param platform - Platform in the format os[/arch[/variant]]
|
|
609
|
-
* @param target - Target build stage
|
|
610
|
-
* @param outputs - BuildKit output configuration
|
|
611
|
-
*/
|
|
612
|
-
readonly build: <E1>(options: ImageBuildOptions<E1>) => Stream.Stream<JSONMessage, ImagesError, never>;
|
|
613
|
-
|
|
614
|
-
/**
|
|
615
|
-
* Delete builder cache
|
|
616
|
-
*
|
|
617
|
-
* @param keep-storage - Amount of disk space in bytes to keep for cache
|
|
618
|
-
* @param all - Remove all types of build cache
|
|
619
|
-
* @param filters - A JSON encoded value of the filters (a
|
|
620
|
-
* `map[string][]string`) to process on the list of build cache objects.
|
|
621
|
-
*
|
|
622
|
-
* Available filters:
|
|
623
|
-
*
|
|
624
|
-
* - `until=<timestamp>` remove cache older than `<timestamp>`. The
|
|
625
|
-
* `<timestamp>` can be Unix timestamps, date formatted timestamps, or
|
|
626
|
-
* Go duration strings (e.g. `10m`, `1h30m`) computed relative to the
|
|
627
|
-
* daemon's local time.
|
|
628
|
-
* - `id=<id>`
|
|
629
|
-
* - `parent=<id>`
|
|
630
|
-
* - `type=<string>`
|
|
631
|
-
* - `description=<string>`
|
|
632
|
-
* - `inuse`
|
|
633
|
-
* - `shared`
|
|
634
|
-
* - `private`
|
|
635
|
-
*/
|
|
636
|
-
readonly buildPrune: (options: BuildPruneOptions) => Effect.Effect<ImagePruneResponse, ImagesError>;
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
* Create an image
|
|
640
|
-
*
|
|
641
|
-
* @param fromImage - Name of the image to pull. The name may include a tag
|
|
642
|
-
* or digest. This parameter may only be used when pulling an image. The
|
|
643
|
-
* pull is cancelled if the HTTP connection is closed.
|
|
644
|
-
* @param fromSrc - Source to import. The value may be a URL from which the
|
|
645
|
-
* image can be retrieved or `-` to read the image from the request body.
|
|
646
|
-
* This parameter may only be used when importing an image.
|
|
647
|
-
* @param repo - Repository name given to an image when it is imported. The
|
|
648
|
-
* repo may include a tag. This parameter may only be used when importing
|
|
649
|
-
* an image.
|
|
650
|
-
* @param tag - Tag or digest. If empty when pulling an image, this causes
|
|
651
|
-
* all tags for the given image to be pulled.
|
|
652
|
-
* @param message - Set commit message for imported image.
|
|
653
|
-
* @param inputImage - Image content if the value `-` has been specified in
|
|
654
|
-
* fromSrc query parameter
|
|
655
|
-
* @param X-Registry-Auth - A base64url-encoded auth configuration.
|
|
656
|
-
*
|
|
657
|
-
* Refer to the [authentication section](#section/Authentication) for
|
|
658
|
-
* details.
|
|
659
|
-
* @param changes - Apply `Dockerfile` instructions to the image that is
|
|
660
|
-
* created, for example: `changes=ENV DEBUG=true`. Note that `ENV
|
|
661
|
-
* DEBUG=true` should be URI component encoded.
|
|
662
|
-
*
|
|
663
|
-
* Supported `Dockerfile` instructions:
|
|
664
|
-
* `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
|
|
665
|
-
* @param platform - Platform in the format os[/arch[/variant]].
|
|
666
|
-
*
|
|
667
|
-
* When used in combination with the `fromImage` option, the daemon checks
|
|
668
|
-
* if the given image is present in the local image cache with the given
|
|
669
|
-
* OS and Architecture, and otherwise attempts to pull the image. If the
|
|
670
|
-
* option is not set, the host's native OS and Architecture are used. If
|
|
671
|
-
* the given image does not exist in the local image cache, the daemon
|
|
672
|
-
* attempts to pull the image with the host's native OS and Architecture.
|
|
673
|
-
* If the given image does exists in the local image cache, but its OS or
|
|
674
|
-
* architecture does not match, a warning is produced.
|
|
675
|
-
*
|
|
676
|
-
* When used with the `fromSrc` option to import an image from an archive,
|
|
677
|
-
* this option sets the platform information for the imported image. If
|
|
678
|
-
* the option is not set, the host's native OS and Architecture are used
|
|
679
|
-
* for the imported image.
|
|
680
|
-
*/
|
|
681
|
-
readonly create: (options: ImageCreateOptions) => Stream.Stream<JSONMessage, ImagesError, never>;
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* Inspect an image
|
|
685
|
-
*
|
|
686
|
-
* @param name - Image name or id
|
|
687
|
-
*/
|
|
688
|
-
readonly inspect: (options: ImageInspectOptions) => Effect.Effect<Readonly<ImageInspect>, ImagesError>;
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* Get the history of an image
|
|
692
|
-
*
|
|
693
|
-
* @param name - Image name or ID
|
|
694
|
-
*/
|
|
695
|
-
readonly history: (
|
|
696
|
-
options: ImageHistoryOptions
|
|
697
|
-
) => Effect.Effect<ReadonlyArray<ImageHistoryResponseItem>, ImagesError, never>;
|
|
698
|
-
|
|
699
|
-
/**
|
|
700
|
-
* Push an image
|
|
701
|
-
*
|
|
702
|
-
* @param name - Image name or ID.
|
|
703
|
-
* @param tag - The tag to associate with the image on the registry.
|
|
704
|
-
* @param X-Registry-Auth - A base64url-encoded auth configuration.
|
|
705
|
-
*
|
|
706
|
-
* Refer to the [authentication section](#section/Authentication) for
|
|
707
|
-
* details.
|
|
708
|
-
*/
|
|
709
|
-
readonly push: (options: ImagePushOptions) => Stream.Stream<string, ImagesError, never>;
|
|
710
|
-
|
|
711
|
-
/**
|
|
712
|
-
* Tag an image
|
|
713
|
-
*
|
|
714
|
-
* @param name - Image name or ID to tag.
|
|
715
|
-
* @param repo - The repository to tag in. For example,
|
|
716
|
-
* `someuser/someimage`.
|
|
717
|
-
* @param tag - The name of the new tag.
|
|
718
|
-
*/
|
|
719
|
-
readonly tag: (options: ImageTagOptions) => Effect.Effect<void, ImagesError>;
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* Remove an image
|
|
723
|
-
*
|
|
724
|
-
* @param name - Image name or ID
|
|
725
|
-
* @param force - Remove the image even if it is being used by stopped
|
|
726
|
-
* containers or has other tags
|
|
727
|
-
* @param noprune - Do not delete untagged parent images
|
|
728
|
-
*/
|
|
729
|
-
readonly delete: (
|
|
730
|
-
options: ImageDeleteOptions
|
|
731
|
-
) => Effect.Effect<Readonly<Array<ImageDeleteResponseItem>>, ImagesError>;
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* Search images
|
|
735
|
-
*
|
|
736
|
-
* @param term - Term to search
|
|
737
|
-
* @param limit - Maximum number of results to return
|
|
738
|
-
* @param filters - A JSON encoded value of the filters (a
|
|
739
|
-
* `map[string][]string`) to process on the images list. Available
|
|
740
|
-
* filters:
|
|
741
|
-
*
|
|
742
|
-
* - `is-automated=(true|false)` (deprecated, see below)
|
|
743
|
-
* - `is-official=(true|false)`
|
|
744
|
-
* - `stars=<number>` Matches images that has at least 'number' stars.
|
|
745
|
-
*
|
|
746
|
-
* The `is-automated` filter is deprecated. The `is_automated` field has
|
|
747
|
-
* been deprecated by Docker Hub's search API. Consequently, searching for
|
|
748
|
-
* `is-automated=true` will yield no results.
|
|
749
|
-
*/
|
|
750
|
-
readonly search: (
|
|
751
|
-
options: ImageSearchOptions
|
|
752
|
-
) => Effect.Effect<ReadonlyArray<Schema.Schema.Type<typeof ImageSearchResponseItem>>, ImagesError>;
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* Delete unused images
|
|
756
|
-
*
|
|
757
|
-
* @param filters - Filters to process on the prune list, encoded as JSON (a
|
|
758
|
-
* `map[string][]string`). Available filters:
|
|
759
|
-
*
|
|
760
|
-
* - `dangling=<boolean>` When set to `true` (or `1`), prune only unused _and_
|
|
761
|
-
* untagged images. When set to `false` (or `0`), all unused images
|
|
762
|
-
* are pruned.
|
|
763
|
-
* - `until=<string>` Prune images created before this timestamp. The
|
|
764
|
-
* `<timestamp>` can be Unix timestamps, date formatted timestamps, or
|
|
765
|
-
* Go duration strings (e.g. `10m`, `1h30m`) computed relative to the
|
|
766
|
-
* daemon machine’s time.
|
|
767
|
-
* - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or
|
|
768
|
-
* `label!=<key>=<value>`) Prune images with (or without, in case
|
|
769
|
-
* `label!=...` is used) the specified labels.
|
|
770
|
-
*/
|
|
771
|
-
readonly prune: (options?: ImagePruneOptions | undefined) => Effect.Effect<ImagePruneResponse, ImagesError>;
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* Create a new image from a container
|
|
775
|
-
*
|
|
776
|
-
* @param containerConfig - The container configuration
|
|
777
|
-
* @param container - The ID or name of the container to commit
|
|
778
|
-
* @param repo - Repository name for the created image
|
|
779
|
-
* @param tag - Tag name for the create image
|
|
780
|
-
* @param comment - Commit message
|
|
781
|
-
* @param author - Author of the image (e.g., `John Hannibal Smith
|
|
782
|
-
* <hannibal@a-team.com>`)
|
|
783
|
-
* @param pause - Whether to pause the container before committing
|
|
784
|
-
* @param changes - `Dockerfile` instructions to apply while committing
|
|
785
|
-
*/
|
|
786
|
-
readonly commit: (options: ImageCommitOptions) => Effect.Effect<Readonly<IDResponse>, ImagesError>;
|
|
787
|
-
|
|
788
|
-
/**
|
|
789
|
-
* Export an image
|
|
790
|
-
*
|
|
791
|
-
* @param name - Image name or ID
|
|
792
|
-
*/
|
|
793
|
-
readonly get: (options: ImageGetOptions) => Stream.Stream<string, ImagesError, never>;
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
* Export several images
|
|
797
|
-
*
|
|
798
|
-
* @param names - Image names to filter by
|
|
799
|
-
*/
|
|
800
|
-
readonly getall: (options: ImageGetAllOptions) => Stream.Stream<string, ImagesError, never>;
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* Import images
|
|
804
|
-
*
|
|
805
|
-
* @param imagesTarball - Tar archive containing images
|
|
806
|
-
* @param quiet - Suppress progress details during load.
|
|
807
|
-
*/
|
|
808
|
-
readonly load: <E1>(options: ImageLoadOptions<E1>) => Effect.Effect<void, ImagesError>;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
195
|
/**
|
|
812
196
|
* Images service
|
|
813
197
|
*
|
|
@@ -815,12 +199,49 @@ export interface ImagesImpl {
|
|
|
815
199
|
* @category Tags
|
|
816
200
|
*/
|
|
817
201
|
export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints/Images", {
|
|
202
|
+
accessors: true,
|
|
203
|
+
dependencies: [],
|
|
204
|
+
|
|
818
205
|
effect: Effect.gen(function* () {
|
|
819
206
|
const defaultClient = yield* HttpClient.HttpClient;
|
|
820
207
|
const client = defaultClient.pipe(HttpClient.filterStatusOk);
|
|
821
208
|
|
|
822
209
|
const list_ = (
|
|
823
|
-
options?:
|
|
210
|
+
options?:
|
|
211
|
+
| {
|
|
212
|
+
/**
|
|
213
|
+
* Show all images. Only images from a final layer (no
|
|
214
|
+
* children) are shown by default.
|
|
215
|
+
*/
|
|
216
|
+
readonly all?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* A JSON encoded value of the filters (a
|
|
219
|
+
* `map[string][]string`) to process on the images list.
|
|
220
|
+
*
|
|
221
|
+
* Available filters:
|
|
222
|
+
*
|
|
223
|
+
* - `before`=(`<image-name>[:<tag>]`, `<image id>` or
|
|
224
|
+
* `<image@digest>`)
|
|
225
|
+
* - `dangling=true`
|
|
226
|
+
* - `label=key` or `label="key=value"` of an image label
|
|
227
|
+
* - `reference`=(`<image-name>[:<tag>]`)
|
|
228
|
+
* - `since`=(`<image-name>[:<tag>]`, `<image id>` or
|
|
229
|
+
* `<image@digest>`)
|
|
230
|
+
* - `until=<timestamp>`
|
|
231
|
+
*/
|
|
232
|
+
readonly filters?: string | undefined;
|
|
233
|
+
/**
|
|
234
|
+
* Compute and show shared size as a `SharedSize` field on
|
|
235
|
+
* each image.
|
|
236
|
+
*/
|
|
237
|
+
readonly "shared-size"?: boolean | undefined;
|
|
238
|
+
/**
|
|
239
|
+
* Show digest information as a `RepoDigests` field on
|
|
240
|
+
* each image.
|
|
241
|
+
*/
|
|
242
|
+
readonly digests?: boolean | undefined;
|
|
243
|
+
}
|
|
244
|
+
| undefined
|
|
824
245
|
): Effect.Effect<ReadonlyArray<ImageSummary>, ImagesError, never> =>
|
|
825
246
|
Function.pipe(
|
|
826
247
|
HttpClientRequest.get("/images/json"),
|
|
@@ -871,12 +292,29 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
871
292
|
Stream.decodeText("utf8"),
|
|
872
293
|
Stream.map(String.linesIterator),
|
|
873
294
|
Stream.flattenIterables,
|
|
874
|
-
Stream.mapEffect(Schema.decode(Schema.parseJson(JSONMessage))
|
|
295
|
+
Stream.mapEffect(Schema.decode(Schema.parseJson(JSONMessage))),
|
|
875
296
|
Stream.mapError((cause) => new ImagesError({ method: "build", cause }))
|
|
876
297
|
);
|
|
877
298
|
|
|
878
299
|
const buildPrune_ = (
|
|
879
|
-
options?:
|
|
300
|
+
options?:
|
|
301
|
+
| {
|
|
302
|
+
readonly "keep-storage"?: number;
|
|
303
|
+
readonly all?: boolean;
|
|
304
|
+
readonly filters?:
|
|
305
|
+
| {
|
|
306
|
+
until?: string | undefined;
|
|
307
|
+
id?: string | undefined;
|
|
308
|
+
parent?: string | undefined;
|
|
309
|
+
type?: string | undefined;
|
|
310
|
+
description?: string | undefined;
|
|
311
|
+
inuse?: boolean | undefined;
|
|
312
|
+
shared?: boolean | undefined;
|
|
313
|
+
private?: boolean | undefined;
|
|
314
|
+
}
|
|
315
|
+
| undefined;
|
|
316
|
+
}
|
|
317
|
+
| undefined
|
|
880
318
|
): Effect.Effect<ImagePruneResponse, ImagesError, never> =>
|
|
881
319
|
Function.pipe(
|
|
882
320
|
HttpClientRequest.post("/build/prune"),
|
|
@@ -889,7 +327,73 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
889
327
|
Effect.scoped
|
|
890
328
|
);
|
|
891
329
|
|
|
892
|
-
const create_ = (options:
|
|
330
|
+
const create_ = (options: {
|
|
331
|
+
/**
|
|
332
|
+
* Name of the image to pull. The name may include a tag or digest.
|
|
333
|
+
* This parameter may only be used when pulling an image. The pull
|
|
334
|
+
* is cancelled if the HTTP connection is closed.
|
|
335
|
+
*/
|
|
336
|
+
readonly fromImage?: string | undefined;
|
|
337
|
+
/**
|
|
338
|
+
* Source to import. The value may be a URL from which the image can
|
|
339
|
+
* be retrieved or `-` to read the image from the request body. This
|
|
340
|
+
* parameter may only be used when importing an image.
|
|
341
|
+
*/
|
|
342
|
+
readonly fromSrc?: string | undefined;
|
|
343
|
+
/**
|
|
344
|
+
* Repository name given to an image when it is imported. The repo
|
|
345
|
+
* may include a tag. This parameter may only be used when importing
|
|
346
|
+
* an image.
|
|
347
|
+
*/
|
|
348
|
+
readonly repo?: string | undefined;
|
|
349
|
+
/**
|
|
350
|
+
* Tag or digest. If empty when pulling an image, this causes all
|
|
351
|
+
* tags for the given image to be pulled.
|
|
352
|
+
*/
|
|
353
|
+
readonly tag?: string | undefined;
|
|
354
|
+
/** Set commit message for imported image. */
|
|
355
|
+
readonly message?: string | undefined;
|
|
356
|
+
/**
|
|
357
|
+
* Image content if the value `-` has been specified in fromSrc
|
|
358
|
+
* query parameter
|
|
359
|
+
*/
|
|
360
|
+
readonly inputImage?: string | undefined;
|
|
361
|
+
/**
|
|
362
|
+
* A base64url-encoded auth configuration.
|
|
363
|
+
*
|
|
364
|
+
* Refer to the [authentication section](#section/Authentication)
|
|
365
|
+
* for details.
|
|
366
|
+
*/
|
|
367
|
+
readonly "X-Registry-Auth"?: string | undefined;
|
|
368
|
+
/**
|
|
369
|
+
* Apply `Dockerfile` instructions to the image that is created, for
|
|
370
|
+
* example: `changes=ENV DEBUG=true`. Note that `ENV DEBUG=true`
|
|
371
|
+
* should be URI component encoded.
|
|
372
|
+
*
|
|
373
|
+
* Supported `Dockerfile` instructions:
|
|
374
|
+
* `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
|
|
375
|
+
*/
|
|
376
|
+
readonly changes?: string | undefined;
|
|
377
|
+
/**
|
|
378
|
+
* Platform in the format os[/arch[/variant]].
|
|
379
|
+
*
|
|
380
|
+
* When used in combination with the `fromImage` option, the daemon
|
|
381
|
+
* checks if the given image is present in the local image cache
|
|
382
|
+
* with the given OS and Architecture, and otherwise attempts to
|
|
383
|
+
* pull the image. If the option is not set, the host's native OS
|
|
384
|
+
* and Architecture are used. If the given image does not exist in
|
|
385
|
+
* the local image cache, the daemon attempts to pull the image with
|
|
386
|
+
* the host's native OS and Architecture. If the given image does
|
|
387
|
+
* exists in the local image cache, but its OS or architecture does
|
|
388
|
+
* not match, a warning is produced.
|
|
389
|
+
*
|
|
390
|
+
* When used with the `fromSrc` option to import an image from an
|
|
391
|
+
* archive, this option sets the platform information for the
|
|
392
|
+
* imported image. If the option is not set, the host's native OS
|
|
393
|
+
* and Architecture are used for the imported image.
|
|
394
|
+
*/
|
|
395
|
+
readonly platform?: string | undefined;
|
|
396
|
+
}): Stream.Stream<JSONMessage, ImagesError, never> =>
|
|
893
397
|
Function.pipe(
|
|
894
398
|
HttpClientRequest.post("/images/create"),
|
|
895
399
|
HttpClientRequest.setHeader("X-Registry-Auth", options["X-Registry-Auth"] || ""),
|
|
@@ -910,18 +414,20 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
910
414
|
Stream.mapError((cause) => new ImagesError({ method: "create", cause }))
|
|
911
415
|
);
|
|
912
416
|
|
|
913
|
-
const inspect_ = (options:
|
|
417
|
+
const inspect_ = (options: {
|
|
418
|
+
readonly name: string;
|
|
419
|
+
}): Effect.Effect<Readonly<ImageInspect>, ImagesError, never> =>
|
|
914
420
|
Function.pipe(
|
|
915
|
-
HttpClientRequest.get(
|
|
421
|
+
HttpClientRequest.get(`/images/${encodeURIComponent(options.name)}/json`),
|
|
916
422
|
client.execute,
|
|
917
423
|
Effect.flatMap(HttpClientResponse.schemaBodyJson(ImageInspect)),
|
|
918
424
|
Effect.mapError((cause) => new ImagesError({ method: "inspect", cause })),
|
|
919
425
|
Effect.scoped
|
|
920
426
|
);
|
|
921
427
|
|
|
922
|
-
const history_ = (
|
|
923
|
-
|
|
924
|
-
): Effect.Effect<ReadonlyArray<ImageHistoryResponseItem>, ImagesError, never> =>
|
|
428
|
+
const history_ = (options: {
|
|
429
|
+
readonly name: string;
|
|
430
|
+
}): Effect.Effect<ReadonlyArray<ImageHistoryResponseItem>, ImagesError, never> =>
|
|
925
431
|
Function.pipe(
|
|
926
432
|
HttpClientRequest.get(`/images/${encodeURIComponent(options.name)}/history`),
|
|
927
433
|
client.execute,
|
|
@@ -930,7 +436,11 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
930
436
|
Effect.scoped
|
|
931
437
|
);
|
|
932
438
|
|
|
933
|
-
const push_ = (options:
|
|
439
|
+
const push_ = (options: {
|
|
440
|
+
readonly name: string;
|
|
441
|
+
readonly tag?: string;
|
|
442
|
+
readonly "X-Registry-Auth": string;
|
|
443
|
+
}): Stream.Stream<string, ImagesError, never> =>
|
|
934
444
|
Function.pipe(
|
|
935
445
|
HttpClientRequest.post(`/images/${encodeURIComponent(options.name)}/push`),
|
|
936
446
|
HttpClientRequest.setHeader("X-Registry-Auth", options["X-Registry-Auth"]),
|
|
@@ -941,7 +451,11 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
941
451
|
Stream.mapError((cause) => new ImagesError({ method: "push", cause }))
|
|
942
452
|
);
|
|
943
453
|
|
|
944
|
-
const tag_ = (options:
|
|
454
|
+
const tag_ = (options: {
|
|
455
|
+
readonly name: string;
|
|
456
|
+
readonly repo?: string;
|
|
457
|
+
readonly tag?: string;
|
|
458
|
+
}): Effect.Effect<void, ImagesError, never> =>
|
|
945
459
|
Function.pipe(
|
|
946
460
|
HttpClientRequest.post(`/images/${encodeURIComponent(options.name)}/tag`),
|
|
947
461
|
maybeAddQueryParameter("repo", Option.fromNullable(options.repo)),
|
|
@@ -952,9 +466,11 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
952
466
|
Effect.scoped
|
|
953
467
|
);
|
|
954
468
|
|
|
955
|
-
const delete_ = (
|
|
956
|
-
|
|
957
|
-
|
|
469
|
+
const delete_ = (options: {
|
|
470
|
+
readonly name: string;
|
|
471
|
+
readonly force?: boolean;
|
|
472
|
+
readonly noprune?: boolean;
|
|
473
|
+
}): Effect.Effect<ReadonlyArray<ImageDeleteResponseItem>, ImagesError, never> =>
|
|
958
474
|
Function.pipe(
|
|
959
475
|
HttpClientRequest.del(`/images/${encodeURIComponent(options.name)}`),
|
|
960
476
|
maybeAddQueryParameter("force", Option.fromNullable(options.force)),
|
|
@@ -965,9 +481,12 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
965
481
|
Effect.scoped
|
|
966
482
|
);
|
|
967
483
|
|
|
968
|
-
const search_ = (
|
|
969
|
-
|
|
970
|
-
|
|
484
|
+
const search_ = (options: {
|
|
485
|
+
readonly term: string;
|
|
486
|
+
readonly limit?: number | undefined;
|
|
487
|
+
readonly stars?: number | undefined;
|
|
488
|
+
readonly "is-official"?: boolean | undefined;
|
|
489
|
+
}): Effect.Effect<ReadonlyArray<ImageSearchResponseItem>, ImagesError, never> =>
|
|
971
490
|
Function.pipe(
|
|
972
491
|
HttpClientRequest.get("/images/search"),
|
|
973
492
|
maybeAddQueryParameter("term", Option.some(options.term)),
|
|
@@ -980,7 +499,15 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
980
499
|
);
|
|
981
500
|
|
|
982
501
|
const prune_ = (
|
|
983
|
-
options?:
|
|
502
|
+
options?:
|
|
503
|
+
| {
|
|
504
|
+
readonly filters?: {
|
|
505
|
+
dangling?: ["true" | "false"] | undefined;
|
|
506
|
+
until?: [string] | undefined;
|
|
507
|
+
label?: Array<string> | undefined;
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
| undefined
|
|
984
511
|
): Effect.Effect<ImagePruneResponse, ImagesError, never> =>
|
|
985
512
|
Function.pipe(
|
|
986
513
|
HttpClientRequest.post("/images/prune"),
|
|
@@ -994,7 +521,16 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
994
521
|
Effect.scoped
|
|
995
522
|
);
|
|
996
523
|
|
|
997
|
-
const commit_ = (options:
|
|
524
|
+
const commit_ = (options: {
|
|
525
|
+
readonly containerConfig: ContainerConfig;
|
|
526
|
+
readonly container?: string;
|
|
527
|
+
readonly repo?: string;
|
|
528
|
+
readonly tag?: string;
|
|
529
|
+
readonly comment?: string;
|
|
530
|
+
readonly author?: string;
|
|
531
|
+
readonly pause?: boolean;
|
|
532
|
+
readonly changes?: string;
|
|
533
|
+
}): Effect.Effect<Readonly<IDResponse>, ImagesError, never> =>
|
|
998
534
|
Function.pipe(
|
|
999
535
|
HttpClientRequest.post("/images/commit"),
|
|
1000
536
|
maybeAddQueryParameter("container", Option.fromNullable(options.container)),
|
|
@@ -1011,7 +547,7 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
1011
547
|
Effect.scoped
|
|
1012
548
|
);
|
|
1013
549
|
|
|
1014
|
-
const get_ = (options:
|
|
550
|
+
const get_ = (options: { readonly name: string }): Stream.Stream<string, ImagesError, never> =>
|
|
1015
551
|
Function.pipe(
|
|
1016
552
|
HttpClientRequest.get(`/images/${encodeURIComponent(options.name)}/get`),
|
|
1017
553
|
client.execute,
|
|
@@ -1020,7 +556,9 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
1020
556
|
Stream.mapError((cause) => new ImagesError({ method: "get", cause }))
|
|
1021
557
|
);
|
|
1022
558
|
|
|
1023
|
-
const getall_ = (
|
|
559
|
+
const getall_ = (
|
|
560
|
+
options?: { readonly names?: Array<string> | undefined } | undefined
|
|
561
|
+
): Stream.Stream<string, ImagesError, never> =>
|
|
1024
562
|
Function.pipe(
|
|
1025
563
|
HttpClientRequest.get("/images/get"),
|
|
1026
564
|
maybeAddQueryParameter("names", Option.fromNullable(options?.names)),
|
|
@@ -1030,7 +568,10 @@ export class Images extends Effect.Service<Images>()("@the-moby-effect/endpoints
|
|
|
1030
568
|
Stream.mapError((cause) => new ImagesError({ method: "getall", cause }))
|
|
1031
569
|
);
|
|
1032
570
|
|
|
1033
|
-
const load_ = <E1>(options:
|
|
571
|
+
const load_ = <E1>(options: {
|
|
572
|
+
readonly imagesTarball: Stream.Stream<Uint8Array, E1, never>;
|
|
573
|
+
readonly quiet?: boolean;
|
|
574
|
+
}): Effect.Effect<void, ImagesError, never> =>
|
|
1034
575
|
Function.pipe(
|
|
1035
576
|
HttpClientRequest.post("/images/load"),
|
|
1036
577
|
maybeAddQueryParameter("quiet", Option.fromNullable(options?.quiet)),
|