@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,292 @@
|
|
|
1
|
+
import { Provider } from '@lakutata/core';
|
|
2
|
+
import { Time } from '@lakutata/utils/Time';
|
|
3
|
+
import type { Readable } from 'node:stream';
|
|
4
|
+
import { type Message } from '@lakutata/grpc';
|
|
5
|
+
import { ContainerStore } from '../../client/ContainerStore.js';
|
|
6
|
+
import type { ContainerdClient } from '../../client/ContainerdClient.js';
|
|
7
|
+
import { type Containerd } from '../Containerd.js';
|
|
8
|
+
import { type ContainerdImage } from './ContainerdImage.js';
|
|
9
|
+
import type { ContainerdContainerState } from '../types/ContainerdContainerState.js';
|
|
10
|
+
import type { ContainerdRestartPolicy } from '../types/ContainerdRestartPolicy.js';
|
|
11
|
+
import type { ContainerdExecResult } from '../types/ContainerdExecResult.js';
|
|
12
|
+
import type { ContainerdContainerNetwork } from '../types/ContainerdContainerNetwork.js';
|
|
13
|
+
import type { ContainerdContainerPort } from '../types/ContainerdContainerPort.js';
|
|
14
|
+
import { ContainerStopOptions } from '../options/container/ContainerStopOptions.js';
|
|
15
|
+
import { ContainerKillOptions } from '../options/container/ContainerKillOptions.js';
|
|
16
|
+
import { ContainerRemoveOptions } from '../options/container/ContainerRemoveOptions.js';
|
|
17
|
+
import { ContainerExecOptions } from '../options/container/ContainerExecOptions.js';
|
|
18
|
+
import { ContainerLogsOptions } from '../options/container/ContainerLogsOptions.js';
|
|
19
|
+
import { ContainerdContainerTTY } from './ContainerdContainerTTY.js';
|
|
20
|
+
import { ContainerTTYOptions } from '../options/container/ContainerTTYOptions.js';
|
|
21
|
+
import { ContainerCommitOptions } from '../options/container/ContainerCommitOptions.js';
|
|
22
|
+
import { ContainerExportDirectoryOptions } from '../options/container/ContainerExportDirectoryOptions.js';
|
|
23
|
+
import type { ContainerCreateOptions } from '../options/container/ContainerCreateOptions.js';
|
|
24
|
+
import type { ContainerdContainerStats } from '../types/ContainerdContainerStats.js';
|
|
25
|
+
/**
|
|
26
|
+
* A container of the {@link Containerd} component's namespace, with the operations of a Docker container: start, stop,
|
|
27
|
+
* kill, pause, exec, terminals, logs, stats, live updates or updates by recreation, commit and file export. Get it from
|
|
28
|
+
* {@link Containerd.getContainer}, {@link Containerd.listContainers} or {@link Containerd.createContainer}; do not create
|
|
29
|
+
* it yourself. Each call returns a new object (transient).
|
|
30
|
+
*
|
|
31
|
+
* Its properties are a snapshot taken when it was obtained: the operations changing the container (`start()`, `stop()`,
|
|
32
|
+
* `kill()`, `pause()`, `wait()`, `update()`…) take a new one when they end, and {@link ContainerdContainer.syncContainerInfo}
|
|
33
|
+
* takes one on demand. The state the container is in decides what works: `exec()`, `createTTY()` and `stats()` need it
|
|
34
|
+
* running, and `remove()` refuses a running container unless forced.
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import {Containerd, type ContainerdContainer, type ContainerdContainerStats} from 'lakutata/com/containerd'
|
|
38
|
+
*
|
|
39
|
+
* declare const containerd: Containerd
|
|
40
|
+
*
|
|
41
|
+
* const container: ContainerdContainer = await containerd.getContainer('worker')
|
|
42
|
+
* if (!container.state.running) await container.start()
|
|
43
|
+
* //The last 100 lines, without following the output
|
|
44
|
+
* for await (const chunk of await container.logs({tail: 100, follow: false})) process.stdout.write(chunk)
|
|
45
|
+
* const stats: ContainerdContainerStats = await container.stats()
|
|
46
|
+
* console.log(stats.cpu.percent, stats.memory.usage)
|
|
47
|
+
* //Live, without a restart
|
|
48
|
+
* await container.update({memoryLimit: 256 * 1024 * 1024})
|
|
49
|
+
* //Its stop signal, then SIGKILL after 5 seconds
|
|
50
|
+
* await container.stop({timeout: 5})
|
|
51
|
+
* await container.remove()
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare class ContainerdContainer extends Provider {
|
|
55
|
+
#private;
|
|
56
|
+
/**
|
|
57
|
+
* Gives the component's container store; set by the component.
|
|
58
|
+
*/
|
|
59
|
+
protected readonly getStore: () => ContainerStore;
|
|
60
|
+
/**
|
|
61
|
+
* Gives the component's containerd client; set by the component.
|
|
62
|
+
*/
|
|
63
|
+
protected readonly getClient: () => ContainerdClient;
|
|
64
|
+
/**
|
|
65
|
+
* Gives the component that created the object.
|
|
66
|
+
*/
|
|
67
|
+
protected readonly getContainerd: () => Containerd;
|
|
68
|
+
/**
|
|
69
|
+
* The container's identifier (64 hexadecimal characters). The name or identifier prefix the object was asked with is
|
|
70
|
+
* resolved to it; it changes when {@link ContainerdContainer.update} creates the container again.
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
/**
|
|
74
|
+
* The container's name (nerdctl's `nerdctl/name` label); its identifier when it has none.
|
|
75
|
+
*/
|
|
76
|
+
name: string;
|
|
77
|
+
/**
|
|
78
|
+
* The container's hostname; empty for the containers created without nerdctl's labels.
|
|
79
|
+
*/
|
|
80
|
+
hostname: string;
|
|
81
|
+
/**
|
|
82
|
+
* The name of the container's image (`docker.io/library/alpine:3.20`).
|
|
83
|
+
*/
|
|
84
|
+
imageName: string;
|
|
85
|
+
/**
|
|
86
|
+
* The platform of the image the container runs (`linux/arm64/v8`); empty when unknown.
|
|
87
|
+
*/
|
|
88
|
+
platform: string;
|
|
89
|
+
/**
|
|
90
|
+
* The container's labels: the ones given at its creation, its image's, and nerdctl's (`nerdctl/*`).
|
|
91
|
+
*/
|
|
92
|
+
labels: Record<string, string>;
|
|
93
|
+
/**
|
|
94
|
+
* The container's restart policy, applied by containerd's restart monitor; `'no'` when it has none.
|
|
95
|
+
*/
|
|
96
|
+
restartPolicy: ContainerdRestartPolicy;
|
|
97
|
+
/**
|
|
98
|
+
* The container's state when the snapshot was taken: its status, its process identifier, its last exit code, and
|
|
99
|
+
* when it started and finished.
|
|
100
|
+
*/
|
|
101
|
+
state: ContainerdContainerState;
|
|
102
|
+
/**
|
|
103
|
+
* The networks the container joins: `['host']`, `['none']`, or the names of its CNI networks.
|
|
104
|
+
*/
|
|
105
|
+
networkNames: string[];
|
|
106
|
+
/**
|
|
107
|
+
* The container's interfaces on its CNI networks (`eth0`, `eth1`…), with their addresses while it runs.
|
|
108
|
+
*/
|
|
109
|
+
networks: ContainerdContainerNetwork[];
|
|
110
|
+
/**
|
|
111
|
+
* The container's ports published on the host, through its first CNI network.
|
|
112
|
+
*/
|
|
113
|
+
ports: ContainerdContainerPort[];
|
|
114
|
+
/**
|
|
115
|
+
* The names of the named volumes the container mounts.
|
|
116
|
+
*/
|
|
117
|
+
volumes: string[];
|
|
118
|
+
/**
|
|
119
|
+
* When the container was created.
|
|
120
|
+
*/
|
|
121
|
+
createdAt: Time;
|
|
122
|
+
/**
|
|
123
|
+
* The container's record in containerd, as last read.
|
|
124
|
+
* @protected
|
|
125
|
+
*/
|
|
126
|
+
protected record: Message;
|
|
127
|
+
/**
|
|
128
|
+
* Read the container's information.
|
|
129
|
+
* @throws {ContainerdContainerNotFoundException} No container matches the identifier or name.
|
|
130
|
+
* @protected
|
|
131
|
+
*/
|
|
132
|
+
protected init(): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* End the log streams followed and the waits of the object.
|
|
135
|
+
* @protected
|
|
136
|
+
*/
|
|
137
|
+
protected destroy(): Promise<void>;
|
|
138
|
+
/**
|
|
139
|
+
* Read the container's information and state again from containerd into the object's properties.
|
|
140
|
+
* @throws {ContainerdContainerNotFoundException} The container no longer exists.
|
|
141
|
+
*/
|
|
142
|
+
syncContainerInfo(): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Run an operation on the container, then read its information again (also when the operation fails).
|
|
145
|
+
* @param operation The operation, given the container's record.
|
|
146
|
+
* @returns What the operation returns.
|
|
147
|
+
* @throws {ContainerdContainerStateException} The container is not in the state the operation needs.
|
|
148
|
+
* @protected
|
|
149
|
+
*/
|
|
150
|
+
protected operate<T>(operation: (record: Message) => Promise<T>): Promise<T>;
|
|
151
|
+
/**
|
|
152
|
+
* Get the container's image.
|
|
153
|
+
* @returns The image.
|
|
154
|
+
* @throws {ContainerdImageNotFoundException} The image was removed since the container was created.
|
|
155
|
+
*/
|
|
156
|
+
image(): Promise<ContainerdImage>;
|
|
157
|
+
/**
|
|
158
|
+
* Start the container: a new task of its root file system, its output appended to its log file (rotated first beyond
|
|
159
|
+
* the component's `logMaxSize`), its CNI networks set up. Its restart policy applies from now on. A running container
|
|
160
|
+
* is left as it is.
|
|
161
|
+
* @throws {ContainerdContainerStateException} The container is paused: unpause it.
|
|
162
|
+
* @throws {Error} The task cannot be created or started (the command is not found, seccomp refuses it…).
|
|
163
|
+
*/
|
|
164
|
+
start(): Promise<void>;
|
|
165
|
+
/**
|
|
166
|
+
* Stop the container: send its stop signal (the one of `options`, else its `stopSignal`, else `SIGTERM`), wait for it
|
|
167
|
+
* to exit, then kill all its processes with `SIGKILL` when the timeout ends. Its exit code is kept, and the restart
|
|
168
|
+
* monitor no longer restarts it. A paused container is resumed first; a stopped one is left as it is.
|
|
169
|
+
* @param options The time to wait in seconds (10 by default) and the signal.
|
|
170
|
+
*/
|
|
171
|
+
stop(options?: ContainerStopOptions): Promise<void>;
|
|
172
|
+
/**
|
|
173
|
+
* Restart the container: stop it as {@link ContainerdContainer.stop} does, then start it.
|
|
174
|
+
* @param options How it is stopped: the time to wait in seconds (10 by default) and the signal.
|
|
175
|
+
* @throws {Error} The task cannot be started again.
|
|
176
|
+
*/
|
|
177
|
+
restart(options?: ContainerStopOptions): Promise<void>;
|
|
178
|
+
/**
|
|
179
|
+
* Send a signal to the container's main process, or to all its processes. `SIGKILL` also tells the restart monitor
|
|
180
|
+
* not to restart it; other signals do not.
|
|
181
|
+
* @param options The signal (`SIGKILL` by default; a name or a number) and `all`.
|
|
182
|
+
* @throws {ContainerdContainerStateException} The container is not running.
|
|
183
|
+
*/
|
|
184
|
+
kill(options?: ContainerKillOptions): Promise<void>;
|
|
185
|
+
/**
|
|
186
|
+
* Pause all the processes of the running container (cgroup freezer).
|
|
187
|
+
* @throws {ContainerdContainerStateException} The container is not running.
|
|
188
|
+
*/
|
|
189
|
+
pause(): Promise<void>;
|
|
190
|
+
/**
|
|
191
|
+
* Resume the processes of the paused container.
|
|
192
|
+
* @throws {ContainerdContainerStateException} The container is not running.
|
|
193
|
+
*/
|
|
194
|
+
unpause(): Promise<void>;
|
|
195
|
+
/**
|
|
196
|
+
* Wait for the container's main process to exit, as `docker wait` does. A container that is not running resolves at
|
|
197
|
+
* once: with the exit code of its last run when it exited or was stopped by {@link ContainerdContainer.stop}, with
|
|
198
|
+
* `0` when it was never started (or when the component did not keep its exit code: a container created by nerdctl
|
|
199
|
+
* or by another `dataRoot`). The wait ends with an error when the object is destroyed.
|
|
200
|
+
* @returns The exit code.
|
|
201
|
+
* @throws {GRPCError} The wait was aborted (from `@lakutata/grpc`, its `code` is `CANCELLED`).
|
|
202
|
+
*/
|
|
203
|
+
wait(): Promise<number>;
|
|
204
|
+
/**
|
|
205
|
+
* Remove the container: its task, its CNI network interfaces, its record, its snapshot and its state directory (its
|
|
206
|
+
* logs included). The named volumes it mounts are kept. With `force`, a running or paused container is killed first.
|
|
207
|
+
* @param options `force` (false by default).
|
|
208
|
+
* @throws {ContainerdContainerStateException} The container is running and `force` is not set.
|
|
209
|
+
*/
|
|
210
|
+
remove(options?: ContainerRemoveOptions): Promise<void>;
|
|
211
|
+
/**
|
|
212
|
+
* Run a command in the running container and wait for it to exit, its outputs captured in memory. The process gets
|
|
213
|
+
* the container's environment (with `env` added), working directory and user unless given. Its standard output and
|
|
214
|
+
* error are kept apart through FIFOs (`mkfifo` of the host); without `mkfifo`, both are in `stdout`.
|
|
215
|
+
* @param options The command (a string is run by `/bin/sh -c`, an array as is), `env`, `workingDir`, `user` (`name`,
|
|
216
|
+
* `uid`, `name:group`), `stdin` (written then closed) and `timeout` (milliseconds, then the process is killed with
|
|
217
|
+
* `SIGKILL`).
|
|
218
|
+
* @returns The exit code and the outputs; a command killed by its timeout resolves with exit code `137`.
|
|
219
|
+
* @throws {ContainerdContainerStateException} The container is not running (stopped or paused).
|
|
220
|
+
* @throws {Error} `stdin` is given and the host has no `mkfifo`; the user is not found in the container.
|
|
221
|
+
*/
|
|
222
|
+
exec(options: ContainerExecOptions): Promise<ContainerdExecResult>;
|
|
223
|
+
/**
|
|
224
|
+
* Read the container's logs: its standard output and error interleaved in one stream, without timestamps, from its
|
|
225
|
+
* log file (and the previous rotated file). By default the stream follows the new output while the container runs
|
|
226
|
+
* (or is being restarted by the restart monitor), and ends once it stopped or when the object is destroyed.
|
|
227
|
+
* @param options `tail`, the number of last lines to start with (all by default), and `follow` (true by default).
|
|
228
|
+
* @returns A readable stream of buffers.
|
|
229
|
+
*/
|
|
230
|
+
logs(options?: ContainerLogsOptions): Promise<Readable>;
|
|
231
|
+
/**
|
|
232
|
+
* Read the resources the running or paused container uses: its cgroup counters and its network interface counters,
|
|
233
|
+
* sampled twice to compute its CPU use over the interval.
|
|
234
|
+
* @param interval The time between the two samples, in milliseconds; `0` takes one sample and reports a CPU use of
|
|
235
|
+
* 0. 1000 by default.
|
|
236
|
+
* @returns The counters of the last sample, with the CPU use over the interval.
|
|
237
|
+
* @throws {ContainerdContainerStateException} The container is not running.
|
|
238
|
+
*/
|
|
239
|
+
stats(interval?: number): Promise<ContainerdContainerStats>;
|
|
240
|
+
/**
|
|
241
|
+
* Open an interactive terminal in the running container: a process with a pseudo terminal (`TERM=xterm`), its input
|
|
242
|
+
* and output through FIFOs (`mkfifo` of the host). Close it with {@link ContainerdContainerTTY.close} when done.
|
|
243
|
+
* @param options The command (a string is run by `/bin/sh -c` as {@link ContainerdContainer.exec} runs it, an array
|
|
244
|
+
* as is; `['/bin/sh']` by default, so the image needs a shell), the initial console size, `env`, `workingDir` and
|
|
245
|
+
* `user`.
|
|
246
|
+
* @returns The terminal, its process started.
|
|
247
|
+
* @throws {ContainerdContainerStateException} The container is not running.
|
|
248
|
+
* @throws {Error} The host has no `mkfifo`; the user is not found in the container.
|
|
249
|
+
*/
|
|
250
|
+
createTTY(options?: ContainerTTYOptions): Promise<ContainerdContainerTTY>;
|
|
251
|
+
/**
|
|
252
|
+
* Update the container's settings. When only resources and the restart policy change (`memoryLimit`, `memorySwap`,
|
|
253
|
+
* `cpus`, `cpuShares`, `cpuSet`, `pidsLimit`, `OOMKillDisable`, `restartPolicy`), they are applied live, without a
|
|
254
|
+
* restart, as `docker update` does: `0` (`[]` for `cpuSet`) removes a limit, from the running container too, and from
|
|
255
|
+
* the settings it is created again with ({@link ContainerResourceOptions}). Any other setting creates the container
|
|
256
|
+
* again with its creation settings and the changes: a new container with the same name (and a new identifier, which
|
|
257
|
+
* this object follows), started when the old one was running; the old one is removed. The recreation only works for
|
|
258
|
+
* the containers created by the component, whose settings it kept.
|
|
259
|
+
* @param options The settings to change, as {@link Containerd.createContainer} takes them.
|
|
260
|
+
* @throws {InvalidValueException} A live update gives a `memorySwap` (positive) to a container without a memory
|
|
261
|
+
* limit, or leaves its `memorySwap` below its `memoryLimit` (from `@lakutata/core`).
|
|
262
|
+
* @throws {ContainerdContainerStateException} The container must be created again but was not created by the
|
|
263
|
+
* component (nerdctl's, or created by another `dataRoot`).
|
|
264
|
+
* @throws {ContainerdImageNotFoundException} From the recreation, as {@link Containerd.createContainer} throws.
|
|
265
|
+
*/
|
|
266
|
+
update(options: Partial<ContainerCreateOptions>): Promise<void>;
|
|
267
|
+
/**
|
|
268
|
+
* Commit the container: save the changes of its root file system (not its mounts) as a new layer on its image,
|
|
269
|
+
* with configuration changes, as `docker commit` does. A running container is paused meanwhile by default.
|
|
270
|
+
* @param options The name of the new image (`<registry>/<repository>:commit-<milliseconds>` of the container's image
|
|
271
|
+
* by default), `pauseBeforeCommitting` (true by default), the configuration `changes`, `comment` and `author`.
|
|
272
|
+
* @returns The new image.
|
|
273
|
+
* @throws {ContainerdImageNotFoundException} The container's image was removed.
|
|
274
|
+
*/
|
|
275
|
+
commit(options?: ContainerCommitOptions): Promise<ContainerdImage>;
|
|
276
|
+
/**
|
|
277
|
+
* Copy a file or directory of the container out as a tar archive, as `docker cp` does: from the running process's
|
|
278
|
+
* file system (its mounts included), or from its root file system when it is not running (without its mounts). The
|
|
279
|
+
* symbolic links of the path are resolved inside the container; the devices, sockets and pipes are not archived.
|
|
280
|
+
* @param options The absolute path in the container, and the destination (a file path, created or replaced, or a
|
|
281
|
+
* writable stream).
|
|
282
|
+
* @throws {ContainerdPathNotFoundException} The path does not exist in the container.
|
|
283
|
+
* @throws {Error} The archive cannot be written.
|
|
284
|
+
*/
|
|
285
|
+
exportDirectory(options: ContainerExportDirectoryOptions): Promise<void>;
|
|
286
|
+
/**
|
|
287
|
+
* List the processes of the running container.
|
|
288
|
+
* @returns Their process identifiers on the host.
|
|
289
|
+
* @throws {ContainerdContainerStateException} The container is not running.
|
|
290
|
+
*/
|
|
291
|
+
processes(): Promise<number[]>;
|
|
292
|
+
}
|