@lakutata/containerd 0.0.0-stage → 3.0.0-beta.1
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/LICENSE +23 -0
- package/README.md +409 -2
- package/THIRD_PARTY_NOTICES.md +310 -0
- package/dist/cjs/client/BuildKit.d.ts +176 -0
- package/dist/cjs/client/BuildKit.js +536 -0
- package/dist/cjs/client/BuildKitMessages.d.ts +35 -0
- package/dist/cjs/client/BuildKitMessages.js +123 -0
- package/dist/cjs/client/ContainerStore.d.ts +558 -0
- package/dist/cjs/client/ContainerStore.js +1384 -0
- package/dist/cjs/client/ContainerdClient.d.ts +244 -0
- package/dist/cjs/client/ContainerdClient.js +455 -0
- package/dist/cjs/client/DockerIgnore.d.ts +44 -0
- package/dist/cjs/client/DockerIgnore.js +186 -0
- package/dist/cjs/client/Fifo.d.ts +31 -0
- package/dist/cjs/client/Fifo.js +66 -0
- package/dist/cjs/client/ImageStore.d.ts +258 -0
- package/dist/cjs/client/ImageStore.js +636 -0
- package/dist/cjs/client/Messages.d.ts +103 -0
- package/dist/cjs/client/Messages.js +397 -0
- package/dist/cjs/client/Networks.d.ts +221 -0
- package/dist/cjs/client/Networks.js +630 -0
- package/dist/cjs/client/Platforms.d.ts +53 -0
- package/dist/cjs/client/Platforms.js +169 -0
- package/dist/cjs/client/Reference.d.ts +33 -0
- package/dist/cjs/client/Reference.js +70 -0
- package/dist/cjs/client/Registry.d.ts +145 -0
- package/dist/cjs/client/Registry.js +272 -0
- package/dist/cjs/client/Rootfs.d.ts +83 -0
- package/dist/cjs/client/Rootfs.js +245 -0
- package/dist/cjs/client/Seccomp.d.ts +36 -0
- package/dist/cjs/client/Seccomp.js +156 -0
- package/dist/cjs/client/Spec.d.ts +151 -0
- package/dist/cjs/client/Spec.js +227 -0
- package/dist/cjs/client/Volumes.d.ts +42 -0
- package/dist/cjs/client/Volumes.js +80 -0
- package/dist/cjs/containerd/Containerd.d.ts +442 -0
- package/dist/cjs/containerd/Containerd.js +929 -0
- package/dist/cjs/containerd/exceptions/ContainerdConnectionException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdConnectionException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNameConflictException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNameConflictException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNotFoundException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNotFoundException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerStateException.d.ts +10 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerStateException.js +17 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageBuildException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageBuildException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageExportException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageExportException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageImportException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageImportException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageNotFoundException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageNotFoundException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePullException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePullException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePushException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePushException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkConflictException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkConflictException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkNotFoundException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkNotFoundException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdPathNotFoundException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdPathNotFoundException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdPlatformException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdPlatformException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeInUseException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeInUseException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeNotFoundException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeNotFoundException.js +15 -0
- package/dist/cjs/containerd/lib/ContainerdContainer.d.ts +292 -0
- package/dist/cjs/containerd/lib/ContainerdContainer.js +536 -0
- package/dist/cjs/containerd/lib/ContainerdContainerTTY.d.ts +116 -0
- package/dist/cjs/containerd/lib/ContainerdContainerTTY.js +178 -0
- package/dist/cjs/containerd/lib/ContainerdErrors.d.ts +6 -0
- package/dist/cjs/containerd/lib/ContainerdErrors.js +37 -0
- package/dist/cjs/containerd/lib/ContainerdImage.d.ts +149 -0
- package/dist/cjs/containerd/lib/ContainerdImage.js +222 -0
- package/dist/cjs/containerd/options/ContainerdPruneOptions.d.ts +44 -0
- package/dist/cjs/containerd/options/ContainerdPruneOptions.js +51 -0
- package/dist/cjs/containerd/options/ContainerdRegistryAuthOptions.d.ts +32 -0
- package/dist/cjs/containerd/options/ContainerdRegistryAuthOptions.js +45 -0
- package/dist/cjs/containerd/options/container/ContainerCommitOptions.d.ts +57 -0
- package/dist/cjs/containerd/options/container/ContainerCommitOptions.js +66 -0
- package/dist/cjs/containerd/options/container/ContainerCreateOptions.d.ts +273 -0
- package/dist/cjs/containerd/options/container/ContainerCreateOptions.js +239 -0
- package/dist/cjs/containerd/options/container/ContainerExecOptions.d.ts +53 -0
- package/dist/cjs/containerd/options/container/ContainerExecOptions.js +63 -0
- package/dist/cjs/containerd/options/container/ContainerExportDirectoryOptions.d.ts +32 -0
- package/dist/cjs/containerd/options/container/ContainerExportDirectoryOptions.js +45 -0
- package/dist/cjs/containerd/options/container/ContainerKillOptions.d.ts +30 -0
- package/dist/cjs/containerd/options/container/ContainerKillOptions.js +41 -0
- package/dist/cjs/containerd/options/container/ContainerLogsOptions.d.ts +34 -0
- package/dist/cjs/containerd/options/container/ContainerLogsOptions.js +44 -0
- package/dist/cjs/containerd/options/container/ContainerRemoveOptions.d.ts +22 -0
- package/dist/cjs/containerd/options/container/ContainerRemoveOptions.js +34 -0
- package/dist/cjs/containerd/options/container/ContainerResourceOptions.d.ts +63 -0
- package/dist/cjs/containerd/options/container/ContainerResourceOptions.js +67 -0
- package/dist/cjs/containerd/options/container/ContainerStopOptions.d.ts +30 -0
- package/dist/cjs/containerd/options/container/ContainerStopOptions.js +41 -0
- package/dist/cjs/containerd/options/container/ContainerTTYConsoleSizeOptions.d.ts +26 -0
- package/dist/cjs/containerd/options/container/ContainerTTYConsoleSizeOptions.js +40 -0
- package/dist/cjs/containerd/options/container/ContainerTTYOptions.d.ts +50 -0
- package/dist/cjs/containerd/options/container/ContainerTTYOptions.js +63 -0
- package/dist/cjs/containerd/options/image/ImageBuildOptions.d.ts +88 -0
- package/dist/cjs/containerd/options/image/ImageBuildOptions.js +95 -0
- package/dist/cjs/containerd/options/image/ImageExportOptions.d.ts +25 -0
- package/dist/cjs/containerd/options/image/ImageExportOptions.js +39 -0
- package/dist/cjs/containerd/options/image/ImageImportOptions.d.ts +38 -0
- package/dist/cjs/containerd/options/image/ImageImportOptions.js +47 -0
- package/dist/cjs/containerd/options/image/ImagePullOptions.d.ts +53 -0
- package/dist/cjs/containerd/options/image/ImagePullOptions.js +66 -0
- package/dist/cjs/containerd/options/image/ImagePushOptions.d.ts +44 -0
- package/dist/cjs/containerd/options/image/ImagePushOptions.js +58 -0
- package/dist/cjs/containerd/options/network/NetworkCreateOptions.d.ts +82 -0
- package/dist/cjs/containerd/options/network/NetworkCreateOptions.js +83 -0
- package/dist/cjs/containerd/options/volume/VolumeCreateOptions.d.ts +26 -0
- package/dist/cjs/containerd/options/volume/VolumeCreateOptions.js +40 -0
- package/dist/cjs/containerd/types/ContainerdBind.d.ts +28 -0
- package/dist/cjs/containerd/types/ContainerdBind.js +2 -0
- package/dist/cjs/containerd/types/ContainerdBuildOutputCallback.d.ts +6 -0
- package/dist/cjs/containerd/types/ContainerdBuildOutputCallback.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerNetwork.d.ts +40 -0
- package/dist/cjs/containerd/types/ContainerdContainerNetwork.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerPort.d.ts +22 -0
- package/dist/cjs/containerd/types/ContainerdContainerPort.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerState.d.ts +42 -0
- package/dist/cjs/containerd/types/ContainerdContainerState.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerStats.d.ts +107 -0
- package/dist/cjs/containerd/types/ContainerdContainerStats.js +2 -0
- package/dist/cjs/containerd/types/ContainerdDevice.d.ts +25 -0
- package/dist/cjs/containerd/types/ContainerdDevice.js +2 -0
- package/dist/cjs/containerd/types/ContainerdExecResult.d.ts +18 -0
- package/dist/cjs/containerd/types/ContainerdExecResult.js +2 -0
- package/dist/cjs/containerd/types/ContainerdImageConfig.d.ts +46 -0
- package/dist/cjs/containerd/types/ContainerdImageConfig.js +2 -0
- package/dist/cjs/containerd/types/ContainerdNetworkInfo.d.ts +49 -0
- package/dist/cjs/containerd/types/ContainerdNetworkInfo.js +2 -0
- package/dist/cjs/containerd/types/ContainerdProgressCallback.d.ts +29 -0
- package/dist/cjs/containerd/types/ContainerdProgressCallback.js +2 -0
- package/dist/cjs/containerd/types/ContainerdPruneResult.d.ts +21 -0
- package/dist/cjs/containerd/types/ContainerdPruneResult.js +2 -0
- package/dist/cjs/containerd/types/ContainerdRestartPolicy.d.ts +13 -0
- package/dist/cjs/containerd/types/ContainerdRestartPolicy.js +2 -0
- package/dist/cjs/containerd/types/ContainerdTmpfs.d.ts +20 -0
- package/dist/cjs/containerd/types/ContainerdTmpfs.js +2 -0
- package/dist/cjs/containerd/types/ContainerdVolume.d.ts +19 -0
- package/dist/cjs/containerd/types/ContainerdVolume.js +2 -0
- package/dist/cjs/containerd/types/ContainerdVolumeInfo.d.ts +26 -0
- package/dist/cjs/containerd/types/ContainerdVolumeInfo.js +2 -0
- package/dist/cjs/exports/Containerd.d.ts +69 -0
- package/dist/cjs/exports/Containerd.js +87 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/client/BuildKit.js +488 -0
- package/dist/esm/client/BuildKitMessages.js +120 -0
- package/dist/esm/client/ContainerStore.js +1339 -0
- package/dist/esm/client/ContainerdClient.js +416 -0
- package/dist/esm/client/DockerIgnore.js +179 -0
- package/dist/esm/client/Fifo.js +59 -0
- package/dist/esm/client/ImageStore.js +628 -0
- package/dist/esm/client/Messages.js +393 -0
- package/dist/esm/client/Networks.js +621 -0
- package/dist/esm/client/Platforms.js +156 -0
- package/dist/esm/client/Reference.js +66 -0
- package/dist/esm/client/Registry.js +263 -0
- package/dist/esm/client/Rootfs.js +234 -0
- package/dist/esm/client/Seccomp.js +152 -0
- package/dist/esm/client/Spec.js +220 -0
- package/dist/esm/client/Volumes.js +73 -0
- package/dist/esm/containerd/Containerd.js +923 -0
- package/dist/esm/containerd/exceptions/ContainerdConnectionException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdContainerNameConflictException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdContainerNotFoundException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdContainerStateException.js +13 -0
- package/dist/esm/containerd/exceptions/ContainerdImageBuildException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImageExportException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImageImportException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImageNotFoundException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImagePullException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImagePushException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdNetworkConflictException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdNetworkNotFoundException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdPathNotFoundException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdPlatformException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdVolumeInUseException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdVolumeNotFoundException.js +11 -0
- package/dist/esm/containerd/lib/ContainerdContainer.js +533 -0
- package/dist/esm/containerd/lib/ContainerdContainerTTY.js +175 -0
- package/dist/esm/containerd/lib/ContainerdErrors.js +34 -0
- package/dist/esm/containerd/lib/ContainerdImage.js +219 -0
- package/dist/esm/containerd/options/ContainerdPruneOptions.js +47 -0
- package/dist/esm/containerd/options/ContainerdRegistryAuthOptions.js +41 -0
- package/dist/esm/containerd/options/container/ContainerCommitOptions.js +62 -0
- package/dist/esm/containerd/options/container/ContainerCreateOptions.js +235 -0
- package/dist/esm/containerd/options/container/ContainerExecOptions.js +59 -0
- package/dist/esm/containerd/options/container/ContainerExportDirectoryOptions.js +41 -0
- package/dist/esm/containerd/options/container/ContainerKillOptions.js +37 -0
- package/dist/esm/containerd/options/container/ContainerLogsOptions.js +40 -0
- package/dist/esm/containerd/options/container/ContainerRemoveOptions.js +30 -0
- package/dist/esm/containerd/options/container/ContainerResourceOptions.js +63 -0
- package/dist/esm/containerd/options/container/ContainerStopOptions.js +37 -0
- package/dist/esm/containerd/options/container/ContainerTTYConsoleSizeOptions.js +36 -0
- package/dist/esm/containerd/options/container/ContainerTTYOptions.js +59 -0
- package/dist/esm/containerd/options/image/ImageBuildOptions.js +91 -0
- package/dist/esm/containerd/options/image/ImageExportOptions.js +35 -0
- package/dist/esm/containerd/options/image/ImageImportOptions.js +43 -0
- package/dist/esm/containerd/options/image/ImagePullOptions.js +62 -0
- package/dist/esm/containerd/options/image/ImagePushOptions.js +54 -0
- package/dist/esm/containerd/options/network/NetworkCreateOptions.js +79 -0
- package/dist/esm/containerd/options/volume/VolumeCreateOptions.js +36 -0
- package/dist/esm/containerd/types/ContainerdBind.js +1 -0
- package/dist/esm/containerd/types/ContainerdBuildOutputCallback.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerNetwork.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerPort.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerState.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerStats.js +1 -0
- package/dist/esm/containerd/types/ContainerdDevice.js +1 -0
- package/dist/esm/containerd/types/ContainerdExecResult.js +1 -0
- package/dist/esm/containerd/types/ContainerdImageConfig.js +1 -0
- package/dist/esm/containerd/types/ContainerdNetworkInfo.js +1 -0
- package/dist/esm/containerd/types/ContainerdProgressCallback.js +1 -0
- package/dist/esm/containerd/types/ContainerdPruneResult.js +1 -0
- package/dist/esm/containerd/types/ContainerdRestartPolicy.js +1 -0
- package/dist/esm/containerd/types/ContainerdTmpfs.js +1 -0
- package/dist/esm/containerd/types/ContainerdVolume.js +1 -0
- package/dist/esm/containerd/types/ContainerdVolumeInfo.js +1 -0
- package/dist/esm/exports/Containerd.js +68 -0
- package/dist/types/client/BuildKit.d.ts +176 -0
- package/dist/types/client/BuildKitMessages.d.ts +35 -0
- package/dist/types/client/ContainerStore.d.ts +558 -0
- package/dist/types/client/ContainerdClient.d.ts +244 -0
- package/dist/types/client/DockerIgnore.d.ts +44 -0
- package/dist/types/client/Fifo.d.ts +31 -0
- package/dist/types/client/ImageStore.d.ts +258 -0
- package/dist/types/client/Messages.d.ts +103 -0
- package/dist/types/client/Networks.d.ts +221 -0
- package/dist/types/client/Platforms.d.ts +53 -0
- package/dist/types/client/Reference.d.ts +33 -0
- package/dist/types/client/Registry.d.ts +145 -0
- package/dist/types/client/Rootfs.d.ts +83 -0
- package/dist/types/client/Seccomp.d.ts +36 -0
- package/dist/types/client/Spec.d.ts +151 -0
- package/dist/types/client/Volumes.d.ts +42 -0
- package/dist/types/containerd/Containerd.d.ts +442 -0
- package/dist/types/containerd/exceptions/ContainerdConnectionException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdContainerNameConflictException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdContainerNotFoundException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdContainerStateException.d.ts +10 -0
- package/dist/types/containerd/exceptions/ContainerdImageBuildException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImageExportException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImageImportException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImageNotFoundException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImagePullException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImagePushException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdNetworkConflictException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdNetworkNotFoundException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdPathNotFoundException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdPlatformException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdVolumeInUseException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdVolumeNotFoundException.d.ts +8 -0
- package/dist/types/containerd/lib/ContainerdContainer.d.ts +292 -0
- package/dist/types/containerd/lib/ContainerdContainerTTY.d.ts +116 -0
- package/dist/types/containerd/lib/ContainerdErrors.d.ts +6 -0
- package/dist/types/containerd/lib/ContainerdImage.d.ts +149 -0
- package/dist/types/containerd/options/ContainerdPruneOptions.d.ts +44 -0
- package/dist/types/containerd/options/ContainerdRegistryAuthOptions.d.ts +32 -0
- package/dist/types/containerd/options/container/ContainerCommitOptions.d.ts +57 -0
- package/dist/types/containerd/options/container/ContainerCreateOptions.d.ts +273 -0
- package/dist/types/containerd/options/container/ContainerExecOptions.d.ts +53 -0
- package/dist/types/containerd/options/container/ContainerExportDirectoryOptions.d.ts +32 -0
- package/dist/types/containerd/options/container/ContainerKillOptions.d.ts +30 -0
- package/dist/types/containerd/options/container/ContainerLogsOptions.d.ts +34 -0
- package/dist/types/containerd/options/container/ContainerRemoveOptions.d.ts +22 -0
- package/dist/types/containerd/options/container/ContainerResourceOptions.d.ts +63 -0
- package/dist/types/containerd/options/container/ContainerStopOptions.d.ts +30 -0
- package/dist/types/containerd/options/container/ContainerTTYConsoleSizeOptions.d.ts +26 -0
- package/dist/types/containerd/options/container/ContainerTTYOptions.d.ts +50 -0
- package/dist/types/containerd/options/image/ImageBuildOptions.d.ts +88 -0
- package/dist/types/containerd/options/image/ImageExportOptions.d.ts +25 -0
- package/dist/types/containerd/options/image/ImageImportOptions.d.ts +38 -0
- package/dist/types/containerd/options/image/ImagePullOptions.d.ts +53 -0
- package/dist/types/containerd/options/image/ImagePushOptions.d.ts +44 -0
- package/dist/types/containerd/options/network/NetworkCreateOptions.d.ts +82 -0
- package/dist/types/containerd/options/volume/VolumeCreateOptions.d.ts +26 -0
- package/dist/types/containerd/types/ContainerdBind.d.ts +28 -0
- package/dist/types/containerd/types/ContainerdBuildOutputCallback.d.ts +6 -0
- package/dist/types/containerd/types/ContainerdContainerNetwork.d.ts +40 -0
- package/dist/types/containerd/types/ContainerdContainerPort.d.ts +22 -0
- package/dist/types/containerd/types/ContainerdContainerState.d.ts +42 -0
- package/dist/types/containerd/types/ContainerdContainerStats.d.ts +107 -0
- package/dist/types/containerd/types/ContainerdDevice.d.ts +25 -0
- package/dist/types/containerd/types/ContainerdExecResult.d.ts +18 -0
- package/dist/types/containerd/types/ContainerdImageConfig.d.ts +46 -0
- package/dist/types/containerd/types/ContainerdNetworkInfo.d.ts +49 -0
- package/dist/types/containerd/types/ContainerdProgressCallback.d.ts +29 -0
- package/dist/types/containerd/types/ContainerdPruneResult.d.ts +21 -0
- package/dist/types/containerd/types/ContainerdRestartPolicy.d.ts +13 -0
- package/dist/types/containerd/types/ContainerdTmpfs.d.ts +20 -0
- package/dist/types/containerd/types/ContainerdVolume.d.ts +19 -0
- package/dist/types/containerd/types/ContainerdVolumeInfo.d.ts +26 -0
- package/dist/types/exports/Containerd.d.ts +69 -0
- package/package.json +51 -4
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
import { type BigIntStats } from 'node:fs';
|
|
2
|
+
import { Readable } from 'node:stream';
|
|
3
|
+
import { ContainerdClient } from './ContainerdClient.js';
|
|
4
|
+
import { type Message } from '@lakutata/grpc';
|
|
5
|
+
import { type Platform } from './Platforms.js';
|
|
6
|
+
import { ImageStore, type ImageConfigChanges, type ResolvedImage } from './ImageStore.js';
|
|
7
|
+
import { VolumeStore } from './Volumes.js';
|
|
8
|
+
import { NetworkStore, type CNINetwork, type ContainerNetworkInterface, type PortMapping } from './Networks.js';
|
|
9
|
+
import { type SpecDevice } from './Spec.js';
|
|
10
|
+
import { type SeccompProfile } from './Seccomp.js';
|
|
11
|
+
/**
|
|
12
|
+
* The labels of the containers: the ones of nerdctl (nerdctl ps, nerdctl logs know them), the ones of the restart
|
|
13
|
+
* monitor of containerd
|
|
14
|
+
*/
|
|
15
|
+
export declare const ContainerLabels: {
|
|
16
|
+
readonly NAME: "nerdctl/name";
|
|
17
|
+
readonly HOSTNAME: "nerdctl/hostname";
|
|
18
|
+
readonly PLATFORM: "nerdctl/platform";
|
|
19
|
+
readonly LOG_URI: "nerdctl/log-uri";
|
|
20
|
+
readonly STATE_DIR: "nerdctl/state-dir";
|
|
21
|
+
readonly NETWORKS: "nerdctl/networks";
|
|
22
|
+
readonly PORTS: "nerdctl/ports";
|
|
23
|
+
readonly MOUNTS: "nerdctl/mounts";
|
|
24
|
+
readonly STOP_SIGNAL: "io.containerd.image.config.stop-signal";
|
|
25
|
+
readonly RESTART_POLICY: "containerd.io/restart.policy";
|
|
26
|
+
readonly RESTART_STATUS: "containerd.io/restart.status";
|
|
27
|
+
readonly RESTART_LOG_URI: "containerd.io/restart.loguri";
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The restart policies of the containers (the ones of the restart monitor of containerd): no, always,
|
|
31
|
+
* unless-stopped, on-failure (on-failure:N, N restarts at most)
|
|
32
|
+
*/
|
|
33
|
+
export type RestartPolicy = 'no' | 'always' | 'unless-stopped' | 'on-failure' | `on-failure:${number}`;
|
|
34
|
+
/**
|
|
35
|
+
* The statuses of the containers
|
|
36
|
+
*/
|
|
37
|
+
export type ContainerStatus = 'created' | 'running' | 'paused' | 'pausing' | 'restarting' | 'exited' | 'unknown';
|
|
38
|
+
/**
|
|
39
|
+
* The state of a container: its task (its process), its last exit
|
|
40
|
+
*/
|
|
41
|
+
export type ContainerRuntimeState = {
|
|
42
|
+
status: ContainerStatus;
|
|
43
|
+
running: boolean;
|
|
44
|
+
paused: boolean;
|
|
45
|
+
pid: number;
|
|
46
|
+
exitCode: number;
|
|
47
|
+
startedAt: Date | null;
|
|
48
|
+
finishedAt: Date | null;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* A mount of a container: a directory or a file of the host (bind), a tmpfs
|
|
52
|
+
*/
|
|
53
|
+
export type ContainerMount = {
|
|
54
|
+
type?: 'bind' | 'tmpfs' | 'volume';
|
|
55
|
+
/**
|
|
56
|
+
* The directory (or the file) of the host of a bind, the name of a volume (created when it does not exist)
|
|
57
|
+
*/
|
|
58
|
+
source?: string;
|
|
59
|
+
target: string;
|
|
60
|
+
readonly?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The options of the mount (size=64m for a tmpfs, the propagation of a bind: rshared…)
|
|
63
|
+
*/
|
|
64
|
+
options?: string[];
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* A device of the host given to a container
|
|
68
|
+
*/
|
|
69
|
+
export type ContainerDeviceMapping = {
|
|
70
|
+
hostPath: string;
|
|
71
|
+
containerPath?: string;
|
|
72
|
+
permissions?: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* The options of the creation of a container
|
|
76
|
+
*/
|
|
77
|
+
export type ContainerCreateOptions = {
|
|
78
|
+
image: string;
|
|
79
|
+
name?: string;
|
|
80
|
+
platform?: Platform;
|
|
81
|
+
hostname?: string;
|
|
82
|
+
cmd?: string[];
|
|
83
|
+
entrypoint?: string[];
|
|
84
|
+
env?: Record<string, string>;
|
|
85
|
+
workingDir?: string;
|
|
86
|
+
user?: string;
|
|
87
|
+
labels?: Record<string, string>;
|
|
88
|
+
terminal?: boolean;
|
|
89
|
+
privileged?: boolean;
|
|
90
|
+
readonlyRootfs?: boolean;
|
|
91
|
+
capAdd?: string[];
|
|
92
|
+
capDrop?: string[];
|
|
93
|
+
/**
|
|
94
|
+
* The profile of seccomp: the default one of containerd (and nerdctl), unconfined, or the file of a profile of OCI
|
|
95
|
+
* (the linux.seccomp of its specification); the privileged containers are unconfined
|
|
96
|
+
*/
|
|
97
|
+
seccompProfile?: 'default' | 'unconfined' | string;
|
|
98
|
+
mounts?: ContainerMount[];
|
|
99
|
+
devices?: ContainerDeviceMapping[];
|
|
100
|
+
/**
|
|
101
|
+
* The devices the cgroup allows besides the ones given, as Docker writes them ("c 188:* rwm"): the devices plugged
|
|
102
|
+
* after the start, given by a bind mount of /dev (or of /dev/serial, /dev/bus/usb)
|
|
103
|
+
*/
|
|
104
|
+
deviceCgroupRules?: string[];
|
|
105
|
+
/**
|
|
106
|
+
* The network of the container: the one of the host, none (its loopback only), or networks of CNI (bridge, the
|
|
107
|
+
* default one of nerdctl), with their addresses
|
|
108
|
+
*/
|
|
109
|
+
network?: 'host' | 'none' | {
|
|
110
|
+
name: string;
|
|
111
|
+
ip?: string;
|
|
112
|
+
ipv6?: string;
|
|
113
|
+
}[];
|
|
114
|
+
/**
|
|
115
|
+
* The ports published on the host (on its first network of CNI)
|
|
116
|
+
*/
|
|
117
|
+
ports?: PortMapping[];
|
|
118
|
+
pidHost?: boolean;
|
|
119
|
+
ipcHost?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* The cgroup namespace: a private one (on cgroup v2), or the one of the host
|
|
122
|
+
*/
|
|
123
|
+
cgroupns?: 'private' | 'host';
|
|
124
|
+
memory?: number;
|
|
125
|
+
memorySwap?: number;
|
|
126
|
+
cpus?: number;
|
|
127
|
+
cpuShares?: number;
|
|
128
|
+
cpuset?: string;
|
|
129
|
+
pidsLimit?: number;
|
|
130
|
+
oomKillDisable?: boolean;
|
|
131
|
+
sysctls?: Record<string, string>;
|
|
132
|
+
shmSize?: number;
|
|
133
|
+
restart?: RestartPolicy;
|
|
134
|
+
stopSignal?: string;
|
|
135
|
+
extraHosts?: Record<string, string>;
|
|
136
|
+
dns?: string[];
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* The options of the store of the containers
|
|
140
|
+
*/
|
|
141
|
+
export type ContainerStoreOptions = {
|
|
142
|
+
snapshotter: string;
|
|
143
|
+
runtime: string;
|
|
144
|
+
cgroupManager: 'cgroupfs' | 'systemd';
|
|
145
|
+
/**
|
|
146
|
+
* The directory of the states of the containers (their logs, their hosts, resolv.conf and hostname)
|
|
147
|
+
*/
|
|
148
|
+
dataRoot: string;
|
|
149
|
+
/**
|
|
150
|
+
* The size of the logs of a container rotated (once): 0 never
|
|
151
|
+
*/
|
|
152
|
+
logMaxSize: number;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* The result of an execution in a container
|
|
156
|
+
*/
|
|
157
|
+
export type ExecResult = {
|
|
158
|
+
exitCode: number;
|
|
159
|
+
stdout: string;
|
|
160
|
+
stderr: string;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* The state of a container written by the store (its last exit, its task deleted)
|
|
164
|
+
*/
|
|
165
|
+
type StoredState = {
|
|
166
|
+
startedAt?: string;
|
|
167
|
+
finishedAt?: string;
|
|
168
|
+
exitCode?: number;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* The resolv.conf of a container: the one of the host, without its local name servers on its own network (the ones of
|
|
172
|
+
* Google when it has no other one, as Docker does)
|
|
173
|
+
* @param content
|
|
174
|
+
* @param ownNetwork
|
|
175
|
+
*/
|
|
176
|
+
export declare function resolvConf(content: string, ownNetwork: boolean): string;
|
|
177
|
+
/**
|
|
178
|
+
* An error of the runtime refusing the profile of seccomp of a container (a runc built without seccomp), with what to do
|
|
179
|
+
* @param error
|
|
180
|
+
*/
|
|
181
|
+
export declare function seccompHint(error: unknown): unknown;
|
|
182
|
+
/**
|
|
183
|
+
* The resources of a container used (its cgroup, its interfaces of network)
|
|
184
|
+
*/
|
|
185
|
+
export type ContainerResourceStats = {
|
|
186
|
+
read: Date;
|
|
187
|
+
pids: {
|
|
188
|
+
current: number;
|
|
189
|
+
limit: number;
|
|
190
|
+
};
|
|
191
|
+
cpu: {
|
|
192
|
+
/**
|
|
193
|
+
* Its time on the CPUs in nanoseconds, in the user mode and in the kernel mode
|
|
194
|
+
*/
|
|
195
|
+
usage: number;
|
|
196
|
+
user: number;
|
|
197
|
+
system: number;
|
|
198
|
+
throttledPeriods: number;
|
|
199
|
+
throttledTime: number;
|
|
200
|
+
onlineCpus: number;
|
|
201
|
+
/**
|
|
202
|
+
* Its use of the CPUs during the interval of the sampling (100 is one CPU used all the time)
|
|
203
|
+
*/
|
|
204
|
+
percent: number;
|
|
205
|
+
};
|
|
206
|
+
memory: {
|
|
207
|
+
usage: number;
|
|
208
|
+
/**
|
|
209
|
+
* Its usage without the cache which can be freed (the one of docker stats)
|
|
210
|
+
*/
|
|
211
|
+
workingSet: number;
|
|
212
|
+
limit: number;
|
|
213
|
+
cache: number;
|
|
214
|
+
swap: number;
|
|
215
|
+
oomKills: number;
|
|
216
|
+
};
|
|
217
|
+
blkio: {
|
|
218
|
+
readBytes: number;
|
|
219
|
+
writeBytes: number;
|
|
220
|
+
readOps: number;
|
|
221
|
+
writeOps: number;
|
|
222
|
+
};
|
|
223
|
+
networks: Record<string, {
|
|
224
|
+
rxBytes: number;
|
|
225
|
+
rxPackets: number;
|
|
226
|
+
rxErrors: number;
|
|
227
|
+
rxDropped: number;
|
|
228
|
+
txBytes: number;
|
|
229
|
+
txPackets: number;
|
|
230
|
+
txErrors: number;
|
|
231
|
+
txDropped: number;
|
|
232
|
+
}>;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* A terminal of a process executed in a container: its input, its output, its size, its exit
|
|
236
|
+
*/
|
|
237
|
+
export type ContainerTerminal = {
|
|
238
|
+
execId: string;
|
|
239
|
+
input: NodeJS.WritableStream & {
|
|
240
|
+
end(): unknown;
|
|
241
|
+
};
|
|
242
|
+
output: Readable;
|
|
243
|
+
resize(cols: number, rows: number): Promise<void>;
|
|
244
|
+
exited: Promise<number>;
|
|
245
|
+
close(): Promise<void>;
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* The resources of a running container updated
|
|
249
|
+
*/
|
|
250
|
+
export type ContainerResourceUpdate = {
|
|
251
|
+
memory?: number;
|
|
252
|
+
memorySwap?: number;
|
|
253
|
+
cpus?: number;
|
|
254
|
+
cpuShares?: number;
|
|
255
|
+
cpuset?: string;
|
|
256
|
+
pidsLimit?: number;
|
|
257
|
+
oomKillDisable?: boolean;
|
|
258
|
+
restart?: RestartPolicy | '';
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* The number of a signal (SIGTERM, TERM, 15)
|
|
262
|
+
* @param signal
|
|
263
|
+
*/
|
|
264
|
+
export declare function signalNumber(signal: string | number): number;
|
|
265
|
+
/**
|
|
266
|
+
* Whether the kernel limits the swap of the cgroups (Docker discards the swap limits otherwise): the files of the swap
|
|
267
|
+
* limits, in the cgroups below the root on cgroup v2 (the root has none)
|
|
268
|
+
*/
|
|
269
|
+
export declare function isSwapLimitSupported(): boolean;
|
|
270
|
+
/**
|
|
271
|
+
* The swap limit of a container (its memory and its swap together), as Docker and nerdctl give it: twice its memory
|
|
272
|
+
* limit by default, -1 unlimited; none without a memory limit, or when the kernel does not limit the swap
|
|
273
|
+
* @param memory
|
|
274
|
+
* @param memorySwap
|
|
275
|
+
*/
|
|
276
|
+
export declare function swapLimit(memory: number | undefined, memorySwap: number | undefined): number | undefined;
|
|
277
|
+
/**
|
|
278
|
+
* The containers of containerd: created from the images (their specifications of OCI, their snapshots), their tasks
|
|
279
|
+
* started, stopped, executed in; their logs written by the shims of containerd (file://), kept by the restart monitor
|
|
280
|
+
* of containerd as their restart policies ask
|
|
281
|
+
*/
|
|
282
|
+
export declare class ContainerStore {
|
|
283
|
+
protected readonly client: ContainerdClient;
|
|
284
|
+
protected readonly images: ImageStore;
|
|
285
|
+
protected readonly networks: NetworkStore;
|
|
286
|
+
readonly options: ContainerStoreOptions;
|
|
287
|
+
readonly volumes: VolumeStore;
|
|
288
|
+
constructor(client: ContainerdClient, images: ImageStore, networks: NetworkStore, options: ContainerStoreOptions, volumes?: VolumeStore);
|
|
289
|
+
/**
|
|
290
|
+
* The names of the volumes of a container
|
|
291
|
+
* @param container
|
|
292
|
+
*/
|
|
293
|
+
static Volumes(container: Message): string[];
|
|
294
|
+
/**
|
|
295
|
+
* The networks of CNI of a container
|
|
296
|
+
* @param network
|
|
297
|
+
* @protected
|
|
298
|
+
*/
|
|
299
|
+
protected cniNetworks(network: ContainerCreateOptions['network']): Promise<{
|
|
300
|
+
network: CNINetwork;
|
|
301
|
+
ip?: string;
|
|
302
|
+
ipv6?: string;
|
|
303
|
+
}[]>;
|
|
304
|
+
/**
|
|
305
|
+
* The profile of seccomp of a container, as nerdctl gives it: none for the privileged ones, unconfined ones and when
|
|
306
|
+
* the kernel does not filter the system calls; the default one by its capabilities; the one of a file
|
|
307
|
+
* @param options
|
|
308
|
+
* @protected
|
|
309
|
+
*/
|
|
310
|
+
protected seccomp(options: ContainerCreateOptions): Promise<SeccompProfile | undefined>;
|
|
311
|
+
/**
|
|
312
|
+
* The interfaces of a container on its networks of CNI (their addresses while it runs)
|
|
313
|
+
* @param container
|
|
314
|
+
*/
|
|
315
|
+
interfaces(container: Message): Promise<ContainerNetworkInterface[]>;
|
|
316
|
+
/**
|
|
317
|
+
* The directory of the state of a container
|
|
318
|
+
* @param id
|
|
319
|
+
*/
|
|
320
|
+
stateDir(id: string): string;
|
|
321
|
+
/**
|
|
322
|
+
* The file of the logs of a container
|
|
323
|
+
* @param id
|
|
324
|
+
*/
|
|
325
|
+
logFile(id: string): string;
|
|
326
|
+
/**
|
|
327
|
+
* The state written of a container
|
|
328
|
+
* @param id
|
|
329
|
+
*/
|
|
330
|
+
protected readState(id: string): Promise<StoredState>;
|
|
331
|
+
protected writeState(id: string, state: StoredState): Promise<void>;
|
|
332
|
+
/**
|
|
333
|
+
* The settings a container was created with by the component (its update creates it again with them)
|
|
334
|
+
* @param id
|
|
335
|
+
*/
|
|
336
|
+
readSettings<T = Record<string, any>>(id: string): Promise<T | undefined>;
|
|
337
|
+
writeSettings(id: string, settings: object): Promise<void>;
|
|
338
|
+
/**
|
|
339
|
+
* Name a container again (its label of nerdctl)
|
|
340
|
+
* @param container
|
|
341
|
+
* @param name
|
|
342
|
+
*/
|
|
343
|
+
rename(container: Message, name: string): Promise<void>;
|
|
344
|
+
/**
|
|
345
|
+
* Find a container: by its identifier, by its name, by a prefix of its identifier (only one)
|
|
346
|
+
* @param idOrName
|
|
347
|
+
*/
|
|
348
|
+
find(idOrName: string): Promise<Message | undefined>;
|
|
349
|
+
/**
|
|
350
|
+
* The containers
|
|
351
|
+
* @param filters the filters of containerd (labels."app"==web)
|
|
352
|
+
*/
|
|
353
|
+
list(filters?: string[]): Promise<Message[]>;
|
|
354
|
+
/**
|
|
355
|
+
* The devices of a host path (a device, or the ones of a directory)
|
|
356
|
+
* @param mapping
|
|
357
|
+
*/
|
|
358
|
+
protected devices(mapping: ContainerDeviceMapping): Promise<SpecDevice[]>;
|
|
359
|
+
/**
|
|
360
|
+
* A device of the host, by the stats of its node (its major and minor numbers of its rdev, as glibc splits it)
|
|
361
|
+
* @param hostPath
|
|
362
|
+
* @param containerPath
|
|
363
|
+
* @param stats
|
|
364
|
+
* @param permissions
|
|
365
|
+
*/
|
|
366
|
+
protected static Device(hostPath: string, containerPath: string, stats: BigIntStats, permissions: string): SpecDevice;
|
|
367
|
+
/**
|
|
368
|
+
* The devices of the host given to a privileged container, as containerd's WithHostDevices gives them: the
|
|
369
|
+
* character and block devices of /dev and of its subdirectories, without the links, the console and the directories
|
|
370
|
+
* of the pseudo terminals, the shared memory, the descriptors and the queues
|
|
371
|
+
* @param directory
|
|
372
|
+
*/
|
|
373
|
+
protected hostDevices(directory?: string): Promise<SpecDevice[]>;
|
|
374
|
+
/**
|
|
375
|
+
* The arguments of the process of a container: its entrypoint and its command, as Docker composes them
|
|
376
|
+
* @param resolved
|
|
377
|
+
* @param options
|
|
378
|
+
*/
|
|
379
|
+
protected args(resolved: ResolvedImage, options: ContainerCreateOptions): string[];
|
|
380
|
+
/**
|
|
381
|
+
* Create a container of an image: its snapshot (its root file system, the image unpacked), its specification, its
|
|
382
|
+
* state directory (its hosts, resolv.conf, hostname, logs)
|
|
383
|
+
* @param options
|
|
384
|
+
*/
|
|
385
|
+
create(options: ContainerCreateOptions): Promise<Message>;
|
|
386
|
+
/**
|
|
387
|
+
* The state of a container: the one of its task, its last exit when it has none
|
|
388
|
+
* @param container
|
|
389
|
+
*/
|
|
390
|
+
state(container: Message): Promise<ContainerRuntimeState>;
|
|
391
|
+
/**
|
|
392
|
+
* Rotate the logs of a container once they are larger than the size of the options: copied to the file .1, the
|
|
393
|
+
* file truncated (the shim writes to its end)
|
|
394
|
+
* @param id
|
|
395
|
+
*/
|
|
396
|
+
rotateLogs(id: string): Promise<void>;
|
|
397
|
+
/**
|
|
398
|
+
* Delete the task of a container (stopped), its exit kept
|
|
399
|
+
* @param id
|
|
400
|
+
*/
|
|
401
|
+
protected deleteTask(id: string): Promise<void>;
|
|
402
|
+
/**
|
|
403
|
+
* Set the labels of a container
|
|
404
|
+
* @param container
|
|
405
|
+
* @param labels
|
|
406
|
+
*/
|
|
407
|
+
protected label(container: Message, labels: Record<string, string>): Promise<void>;
|
|
408
|
+
/**
|
|
409
|
+
* Start a container: a new task of its snapshot (the one of its previous run deleted), its output written to its
|
|
410
|
+
* logs
|
|
411
|
+
* @param container
|
|
412
|
+
*/
|
|
413
|
+
start(container: Message): Promise<number>;
|
|
414
|
+
/**
|
|
415
|
+
* Wait for the task of a container to exit, at most a time
|
|
416
|
+
* @param id
|
|
417
|
+
* @param timeout milliseconds
|
|
418
|
+
*/
|
|
419
|
+
protected waitExit(id: string, timeout: number): Promise<boolean>;
|
|
420
|
+
/**
|
|
421
|
+
* Stop a container: its stop signal (SIGTERM, the one of its image) sent, then SIGKILL to all its processes after a
|
|
422
|
+
* time; its task deleted, its restart monitor told not to restart it
|
|
423
|
+
* @param container
|
|
424
|
+
* @param options
|
|
425
|
+
*/
|
|
426
|
+
stop(container: Message, options?: {
|
|
427
|
+
timeout?: number;
|
|
428
|
+
signal?: string | number;
|
|
429
|
+
}): Promise<void>;
|
|
430
|
+
/**
|
|
431
|
+
* Send a signal to a container (its main process, or all its processes)
|
|
432
|
+
* @param container
|
|
433
|
+
* @param signal
|
|
434
|
+
* @param all
|
|
435
|
+
*/
|
|
436
|
+
kill(container: Message, signal?: string | number, all?: boolean): Promise<void>;
|
|
437
|
+
pause(container: Message): Promise<void>;
|
|
438
|
+
resume(container: Message): Promise<void>;
|
|
439
|
+
/**
|
|
440
|
+
* Check that a container has a task which did not exit (the shim refuses to pause or resume a stopped one with an
|
|
441
|
+
* error of no code)
|
|
442
|
+
* @param container
|
|
443
|
+
* @protected
|
|
444
|
+
*/
|
|
445
|
+
protected running(container: Message): Promise<void>;
|
|
446
|
+
/**
|
|
447
|
+
* The processes of a running container (their identifiers on the host)
|
|
448
|
+
* @param container
|
|
449
|
+
*/
|
|
450
|
+
processes(container: Message): Promise<number[]>;
|
|
451
|
+
/**
|
|
452
|
+
* Wait for the main process of a container to exit: its exit code; the last one at once when it has no task (never
|
|
453
|
+
* started: 0, stopped: its task deleted, its exit kept by the store)
|
|
454
|
+
* @param container
|
|
455
|
+
* @param signal
|
|
456
|
+
*/
|
|
457
|
+
wait(container: Message, signal?: AbortSignal): Promise<number>;
|
|
458
|
+
/**
|
|
459
|
+
* The error of an operation on the task of a container: the container is not running when it has no task (or its
|
|
460
|
+
* process exited)
|
|
461
|
+
* @param container
|
|
462
|
+
* @param error
|
|
463
|
+
* @protected
|
|
464
|
+
*/
|
|
465
|
+
protected taskError(container: Message, error: unknown): unknown;
|
|
466
|
+
/**
|
|
467
|
+
* Remove a container: its task (a running one only when forced), its snapshot, its state directory
|
|
468
|
+
* @param container
|
|
469
|
+
* @param force
|
|
470
|
+
*/
|
|
471
|
+
remove(container: Message, force?: boolean): Promise<void>;
|
|
472
|
+
/**
|
|
473
|
+
* Execute a command in a running container, its output captured: its standard output and its error apart (FIFOs,
|
|
474
|
+
* mkfifo of the system), or together in its standard output without mkfifo (the files of the shim)
|
|
475
|
+
* @param container
|
|
476
|
+
* @param options
|
|
477
|
+
*/
|
|
478
|
+
exec(container: Message, options: {
|
|
479
|
+
cmd: string[];
|
|
480
|
+
env?: Record<string, string>;
|
|
481
|
+
workingDir?: string;
|
|
482
|
+
user?: string;
|
|
483
|
+
stdin?: string | Buffer;
|
|
484
|
+
timeout?: number;
|
|
485
|
+
}): Promise<ExecResult>;
|
|
486
|
+
/**
|
|
487
|
+
* The logs of a container: its last lines, followed while it runs (until the signal aborts)
|
|
488
|
+
* @param container
|
|
489
|
+
* @param options
|
|
490
|
+
*/
|
|
491
|
+
logs(container: Message, options?: {
|
|
492
|
+
tail?: number;
|
|
493
|
+
follow?: boolean;
|
|
494
|
+
signal?: AbortSignal;
|
|
495
|
+
}): Readable;
|
|
496
|
+
/**
|
|
497
|
+
* A sample of the resources a running container uses
|
|
498
|
+
* @param container
|
|
499
|
+
* @protected
|
|
500
|
+
*/
|
|
501
|
+
protected sample(container: Message): Promise<Omit<ContainerResourceStats, 'cpu'> & {
|
|
502
|
+
cpu: Omit<ContainerResourceStats['cpu'], 'percent'>;
|
|
503
|
+
}>;
|
|
504
|
+
/**
|
|
505
|
+
* The resources a running container uses: two samples, its use of the CPUs between them
|
|
506
|
+
* @param container
|
|
507
|
+
* @param interval milliseconds between the samples
|
|
508
|
+
*/
|
|
509
|
+
stats(container: Message, interval?: number): Promise<ContainerResourceStats>;
|
|
510
|
+
/**
|
|
511
|
+
* Open a terminal in a running container: a process executed with its pseudo terminal, its input and its output by
|
|
512
|
+
* FIFOs (mkfifo of the system)
|
|
513
|
+
* @param container
|
|
514
|
+
* @param options
|
|
515
|
+
*/
|
|
516
|
+
terminal(container: Message, options: {
|
|
517
|
+
cmd: string[];
|
|
518
|
+
cols?: number;
|
|
519
|
+
rows?: number;
|
|
520
|
+
env?: Record<string, string>;
|
|
521
|
+
workingDir?: string;
|
|
522
|
+
user?: string;
|
|
523
|
+
}): Promise<ContainerTerminal>;
|
|
524
|
+
/**
|
|
525
|
+
* Update the resources of a container (its specification, the cgroup of its running task) and its restart policy,
|
|
526
|
+
* without restarting it (docker update)
|
|
527
|
+
* @param container
|
|
528
|
+
* @param update
|
|
529
|
+
*/
|
|
530
|
+
updateResources(container: Message, update: ContainerResourceUpdate): Promise<void>;
|
|
531
|
+
/**
|
|
532
|
+
* Commit a container: the changes of its file system as a layer on its image, a new image (its container paused
|
|
533
|
+
* meanwhile when it runs, by default)
|
|
534
|
+
* @param container
|
|
535
|
+
* @param options
|
|
536
|
+
*/
|
|
537
|
+
commit(container: Message, options: {
|
|
538
|
+
name: string;
|
|
539
|
+
pause?: boolean;
|
|
540
|
+
changes?: ImageConfigChanges;
|
|
541
|
+
comment?: string;
|
|
542
|
+
author?: string;
|
|
543
|
+
}): Promise<string>;
|
|
544
|
+
/**
|
|
545
|
+
* Archive a path of the file system of a container (tar): the one of its running process (its mounts with it), or
|
|
546
|
+
* the one of its snapshot when it is not running; its symbolic links resolved in it
|
|
547
|
+
* @param container
|
|
548
|
+
* @param file an absolute path in the container
|
|
549
|
+
* @param destination
|
|
550
|
+
*/
|
|
551
|
+
archive(container: Message, file: string, destination: NodeJS.WritableStream): Promise<void>;
|
|
552
|
+
/**
|
|
553
|
+
* The name of a container
|
|
554
|
+
* @param container
|
|
555
|
+
*/
|
|
556
|
+
static Name(container: Message): string;
|
|
557
|
+
}
|
|
558
|
+
export {};
|