@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,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ContainerdPruneOptions = void 0;
|
|
13
|
+
const core_1 = require("@lakutata/core");
|
|
14
|
+
const dto_1 = require("@lakutata/core/decorator/dto");
|
|
15
|
+
/**
|
|
16
|
+
* What {@link Containerd.prune} removes; every field is optional. A resource whose removal fails is skipped. Unlike the
|
|
17
|
+
* Docker component's options, the volumes are kept by default, and `allImages` removes the tagged images too.
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
21
|
+
*
|
|
22
|
+
* declare const containerd: Containerd
|
|
23
|
+
*
|
|
24
|
+
* //The stopped containers and the dangling images (the defaults), and the unused volumes with their data
|
|
25
|
+
* const removed = await containerd.prune({volumes: true})
|
|
26
|
+
* console.log(removed.containers, removed.images, removed.volumes)
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
class ContainerdPruneOptions extends core_1.DTO {
|
|
30
|
+
}
|
|
31
|
+
exports.ContainerdPruneOptions = ContainerdPruneOptions;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, dto_1.Expect)(core_1.DTO.Boolean().optional().default(true)),
|
|
34
|
+
__metadata("design:type", Boolean)
|
|
35
|
+
], ContainerdPruneOptions.prototype, "containers", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, dto_1.Expect)(core_1.DTO.Boolean().optional().default(true)),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], ContainerdPruneOptions.prototype, "images", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, dto_1.Expect)(core_1.DTO.Boolean().optional().default(false)),
|
|
42
|
+
__metadata("design:type", Boolean)
|
|
43
|
+
], ContainerdPruneOptions.prototype, "allImages", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, dto_1.Expect)(core_1.DTO.Boolean().optional().default(false)),
|
|
46
|
+
__metadata("design:type", Boolean)
|
|
47
|
+
], ContainerdPruneOptions.prototype, "networks", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, dto_1.Expect)(core_1.DTO.Boolean().optional().default(false)),
|
|
50
|
+
__metadata("design:type", Boolean)
|
|
51
|
+
], ContainerdPruneOptions.prototype, "volumes", void 0);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DTO } from '@lakutata/core';
|
|
2
|
+
/**
|
|
3
|
+
* The credentials of a container registry, given to a pull, a push or a build (their `auth` option) for the registry
|
|
4
|
+
* of the reference they name. They replace, for that operation, the ones the component's `registryAuths` option gives
|
|
5
|
+
* that registry. Every field is optional; without `username` nor `identityToken`, the registry is accessed anonymously.
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
9
|
+
*
|
|
10
|
+
* declare const containerd: Containerd
|
|
11
|
+
*
|
|
12
|
+
* await containerd.pullImage({
|
|
13
|
+
* image: 'registry.example.com:5000/team/app:1.0',
|
|
14
|
+
* auth: {username: 'ci', password: process.env.REGISTRY_TOKEN ?? ''}
|
|
15
|
+
* })
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class ContainerdRegistryAuthOptions extends DTO {
|
|
19
|
+
/**
|
|
20
|
+
* The user name, sent with `password` (HTTP basic authentication, or the registry's token service).
|
|
21
|
+
*/
|
|
22
|
+
username?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The password of `username`, or an access token the registry accepts as one; ignored without `username`.
|
|
25
|
+
*/
|
|
26
|
+
password?: string;
|
|
27
|
+
/**
|
|
28
|
+
* An identity token (the OAuth2 refresh token the registry issued, as `docker login` stores it), exchanged with the
|
|
29
|
+
* registry's token service for an access token instead of `username` and `password`.
|
|
30
|
+
*/
|
|
31
|
+
identityToken?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ContainerdRegistryAuthOptions = void 0;
|
|
13
|
+
const core_1 = require("@lakutata/core");
|
|
14
|
+
const dto_1 = require("@lakutata/core/decorator/dto");
|
|
15
|
+
/**
|
|
16
|
+
* The credentials of a container registry, given to a pull, a push or a build (their `auth` option) for the registry
|
|
17
|
+
* of the reference they name. They replace, for that operation, the ones the component's `registryAuths` option gives
|
|
18
|
+
* that registry. Every field is optional; without `username` nor `identityToken`, the registry is accessed anonymously.
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
22
|
+
*
|
|
23
|
+
* declare const containerd: Containerd
|
|
24
|
+
*
|
|
25
|
+
* await containerd.pullImage({
|
|
26
|
+
* image: 'registry.example.com:5000/team/app:1.0',
|
|
27
|
+
* auth: {username: 'ci', password: process.env.REGISTRY_TOKEN ?? ''}
|
|
28
|
+
* })
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
class ContainerdRegistryAuthOptions extends core_1.DTO {
|
|
32
|
+
}
|
|
33
|
+
exports.ContainerdRegistryAuthOptions = ContainerdRegistryAuthOptions;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, dto_1.Expect)(core_1.DTO.String().optional()),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], ContainerdRegistryAuthOptions.prototype, "username", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, dto_1.Expect)(core_1.DTO.String().optional()),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], ContainerdRegistryAuthOptions.prototype, "password", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, dto_1.Expect)(core_1.DTO.String().optional()),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], ContainerdRegistryAuthOptions.prototype, "identityToken", void 0);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { DTO } from '@lakutata/core';
|
|
2
|
+
/**
|
|
3
|
+
* How {@link ContainerdContainer.commit} saves a container's file system changes as a new image: one layer on its
|
|
4
|
+
* image, for the container's platform, with the image configuration changed as asked; the image is unpacked so it can
|
|
5
|
+
* run at once. Every field is optional. Unlike the Docker component's options, the image configuration can be changed
|
|
6
|
+
* and the commit commented, and an image committed without `repoTag` is still named.
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
10
|
+
*
|
|
11
|
+
* declare const containerd: Containerd
|
|
12
|
+
*
|
|
13
|
+
* const container = await containerd.getContainer('builder')
|
|
14
|
+
* const image = await container.commit({
|
|
15
|
+
* repoTag: 'registry.example.com/app:1.1',
|
|
16
|
+
* changes: {cmd: ['node', 'server.js'], env: {NODE_ENV: 'production'}, exposedPorts: ['3000/tcp']},
|
|
17
|
+
* comment: 'Dependencies installed',
|
|
18
|
+
* author: 'CI <ci@example.com>'
|
|
19
|
+
* })
|
|
20
|
+
* console.log(image.name, image.digest)
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class ContainerCommitOptions extends DTO {
|
|
24
|
+
/**
|
|
25
|
+
* The name of the new image (`'app:1.1'`, normalized to `'docker.io/library/app:1.1'`). By default, the
|
|
26
|
+
* container's image repository with the tag `commit-<milliseconds since the epoch>`.
|
|
27
|
+
*/
|
|
28
|
+
repoTag?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Pause a running container while its changes are read, so that they are consistent; it is resumed after, even on
|
|
31
|
+
* a failure.
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
pauseBeforeCommitting?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The changes of the new image's configuration, every field optional: `cmd` and `entrypoint` replace the image's
|
|
37
|
+
* ones; `env` adds variables (replacing them by name); `workingDir` and `user` replace the image's ones; `labels`
|
|
38
|
+
* are added; `exposedPorts` adds ports as `"8080"` (TCP) or `"8080/udp"` (`tcp`, `udp` or `sctp`).
|
|
39
|
+
*/
|
|
40
|
+
changes?: {
|
|
41
|
+
cmd?: string[];
|
|
42
|
+
entrypoint?: string[];
|
|
43
|
+
env?: Record<string, string>;
|
|
44
|
+
workingDir?: string;
|
|
45
|
+
user?: string;
|
|
46
|
+
labels?: Record<string, string>;
|
|
47
|
+
exposedPorts?: string[];
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* The comment of the commit, written to the image history.
|
|
51
|
+
*/
|
|
52
|
+
comment?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The author of the commit (`'Name <email>'`), written to the image configuration and its history.
|
|
55
|
+
*/
|
|
56
|
+
author?: string;
|
|
57
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ContainerCommitOptions = void 0;
|
|
13
|
+
const core_1 = require("@lakutata/core");
|
|
14
|
+
const dto_1 = require("@lakutata/core/decorator/dto");
|
|
15
|
+
/**
|
|
16
|
+
* How {@link ContainerdContainer.commit} saves a container's file system changes as a new image: one layer on its
|
|
17
|
+
* image, for the container's platform, with the image configuration changed as asked; the image is unpacked so it can
|
|
18
|
+
* run at once. Every field is optional. Unlike the Docker component's options, the image configuration can be changed
|
|
19
|
+
* and the commit commented, and an image committed without `repoTag` is still named.
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
23
|
+
*
|
|
24
|
+
* declare const containerd: Containerd
|
|
25
|
+
*
|
|
26
|
+
* const container = await containerd.getContainer('builder')
|
|
27
|
+
* const image = await container.commit({
|
|
28
|
+
* repoTag: 'registry.example.com/app:1.1',
|
|
29
|
+
* changes: {cmd: ['node', 'server.js'], env: {NODE_ENV: 'production'}, exposedPorts: ['3000/tcp']},
|
|
30
|
+
* comment: 'Dependencies installed',
|
|
31
|
+
* author: 'CI <ci@example.com>'
|
|
32
|
+
* })
|
|
33
|
+
* console.log(image.name, image.digest)
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
class ContainerCommitOptions extends core_1.DTO {
|
|
37
|
+
}
|
|
38
|
+
exports.ContainerCommitOptions = ContainerCommitOptions;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, dto_1.Expect)(core_1.DTO.String().optional()),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ContainerCommitOptions.prototype, "repoTag", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, dto_1.Expect)(core_1.DTO.Boolean().optional().default(true)),
|
|
45
|
+
__metadata("design:type", Boolean)
|
|
46
|
+
], ContainerCommitOptions.prototype, "pauseBeforeCommitting", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, dto_1.Expect)(core_1.DTO.Object({
|
|
49
|
+
cmd: core_1.DTO.Array(core_1.DTO.String()).optional(),
|
|
50
|
+
entrypoint: core_1.DTO.Array(core_1.DTO.String()).optional(),
|
|
51
|
+
env: core_1.DTO.Object().pattern(core_1.DTO.String(), core_1.DTO.String().allow('')).optional(),
|
|
52
|
+
workingDir: core_1.DTO.String().optional(),
|
|
53
|
+
user: core_1.DTO.String().optional(),
|
|
54
|
+
labels: core_1.DTO.Object().pattern(core_1.DTO.String(), core_1.DTO.String().allow('')).optional(),
|
|
55
|
+
exposedPorts: core_1.DTO.Array(core_1.DTO.String().pattern(/^\d+(\/(tcp|udp|sctp))?$/)).optional()
|
|
56
|
+
}).optional()),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], ContainerCommitOptions.prototype, "changes", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, dto_1.Expect)(core_1.DTO.String().optional()),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], ContainerCommitOptions.prototype, "comment", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, dto_1.Expect)(core_1.DTO.String().optional()),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], ContainerCommitOptions.prototype, "author", void 0);
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { DTO } from '@lakutata/core';
|
|
2
|
+
import type { ContainerdRestartPolicy } from '../../types/ContainerdRestartPolicy.js';
|
|
3
|
+
import type { ContainerdBind } from '../../types/ContainerdBind.js';
|
|
4
|
+
import type { ContainerdDevice } from '../../types/ContainerdDevice.js';
|
|
5
|
+
import type { ContainerdTmpfs } from '../../types/ContainerdTmpfs.js';
|
|
6
|
+
import type { ContainerdVolume } from '../../types/ContainerdVolume.js';
|
|
7
|
+
/**
|
|
8
|
+
* The settings of a container created by {@link Containerd.createContainer}: its image, its process, its mounts, its
|
|
9
|
+
* networks, its resources and its security. Only `image` is required; the container is created stopped (`start()` it)
|
|
10
|
+
* as a nerdctl container (`nerdctl ps` lists it), with an OCI runtime specification built as nerdctl builds it. The
|
|
11
|
+
* component keeps these settings: {@link ContainerdContainer.update} creates the container again with the ones it
|
|
12
|
+
* changes.
|
|
13
|
+
*
|
|
14
|
+
* As with the Docker component, the container joins the default network `bridge` unless `network` or `networks` is
|
|
15
|
+
* given (here a CNI network, the CNI plugins needed); its ports are published only on a CNI network, and its named volumes are directories the component keeps (not Docker's nor
|
|
16
|
+
* nerdctl's volumes).
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
20
|
+
*
|
|
21
|
+
* declare const containerd: Containerd
|
|
22
|
+
*
|
|
23
|
+
* await containerd.pullImage({image: 'nginx:1.27'})
|
|
24
|
+
* const container = await containerd.createContainer({
|
|
25
|
+
* image: 'nginx:1.27',
|
|
26
|
+
* name: 'web',
|
|
27
|
+
* env: {NGINX_PORT: '80'},
|
|
28
|
+
* binds: [{hostPath: '/srv/www', containerPath: '/usr/share/nginx/html', rw: false}],
|
|
29
|
+
* volumes: [{volumeName: 'web-cache', containerPath: '/var/cache/nginx'}],
|
|
30
|
+
* //The default nerdctl network, its port 80 published on the host port 8080
|
|
31
|
+
* networks: [{networkName: 'bridge'}],
|
|
32
|
+
* ports: [{port: 80, hostPorts: [8080]}],
|
|
33
|
+
* memoryLimit: 256 * 1024 * 1024,
|
|
34
|
+
* cpus: 0.5,
|
|
35
|
+
* restartPolicy: 'unless-stopped'
|
|
36
|
+
* })
|
|
37
|
+
* await container.start()
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare class ContainerCreateOptions extends DTO {
|
|
41
|
+
/**
|
|
42
|
+
* The image of the container: its name or a reference (`'alpine:3.20'`, `'docker.io/library/alpine:3.20'`,
|
|
43
|
+
* `'registry.example.com/app@sha256:…'`). Required. The image must be in containerd already (pull, import or build
|
|
44
|
+
* it first): a missing one throws {@link ContainerdImageNotFoundException}.
|
|
45
|
+
*/
|
|
46
|
+
image: string;
|
|
47
|
+
/**
|
|
48
|
+
* The platform of the image run (`'linux/amd64'`, `'linux/arm/v7'`, or `'arm64'` for `linux/arm64`), pulled
|
|
49
|
+
* beforehand; another architecture than the machine's needs a QEMU emulator registered in binfmt_misc
|
|
50
|
+
* ({@link Containerd.supportedPlatforms}). The machine's platform by default; an image without it throws
|
|
51
|
+
* {@link ContainerdPlatformException}.
|
|
52
|
+
*/
|
|
53
|
+
platform?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The name of the container, matching `[a-zA-Z0-9][a-zA-Z0-9_.-]*` and unique in the namespace (a name in use
|
|
56
|
+
* throws {@link ContainerdContainerNameConflictException}). By default, the last part of the image name and the
|
|
57
|
+
* first 5 hexadecimal digits of the container ID (`'nginx-3fa2c'`).
|
|
58
|
+
*/
|
|
59
|
+
name?: string;
|
|
60
|
+
/**
|
|
61
|
+
* The host name of the container, written to its `/etc/hostname` and its `HOSTNAME` variable. By default, the
|
|
62
|
+
* host's name on the host network, the first 12 digits of the container ID otherwise.
|
|
63
|
+
*/
|
|
64
|
+
hostname?: string;
|
|
65
|
+
/**
|
|
66
|
+
* The command of the container, its arguments (`['nginx', '-g', 'daemon off;']`), run after the entry point. The
|
|
67
|
+
* image's command by default; dropped when `entrypoint` is given without it (as Docker does).
|
|
68
|
+
*/
|
|
69
|
+
cmd?: string[];
|
|
70
|
+
/**
|
|
71
|
+
* The entry point of the container, its arguments, replacing the image's; `['']` removes the image's entry point.
|
|
72
|
+
* The image's entry point by default. A container left with neither an entry point nor a command fails to be
|
|
73
|
+
* created.
|
|
74
|
+
*/
|
|
75
|
+
entrypoint?: string[];
|
|
76
|
+
/**
|
|
77
|
+
* The environment variables of the container, added to the image's ones (and replacing them by name). The
|
|
78
|
+
* container also gets `HOSTNAME`, and `PATH` and `HOME` (the user's home directory) when the image has none.
|
|
79
|
+
*/
|
|
80
|
+
env?: Record<string, string>;
|
|
81
|
+
/**
|
|
82
|
+
* The working directory of the container's process; the image's one by default, `/` without it.
|
|
83
|
+
*/
|
|
84
|
+
workingDir?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The user of the container's process: `'user'`, `'user:group'`, `'uid'` or `'uid:gid'`, the names resolved by
|
|
87
|
+
* the image's `/etc/passwd` and `/etc/group`. The image's user by default, root without it.
|
|
88
|
+
*/
|
|
89
|
+
user?: string;
|
|
90
|
+
/**
|
|
91
|
+
* The labels of the container, added to the image's ones; the ones the component sets (`nerdctl/…`,
|
|
92
|
+
* `containerd.io/restart.…`) cannot be overridden. {@link Containerd.listContainers} filters by them.
|
|
93
|
+
*/
|
|
94
|
+
labels?: Record<string, string>;
|
|
95
|
+
/**
|
|
96
|
+
* Give the container all the capabilities, access to every device by its cgroup, the host's devices in its `/dev`
|
|
97
|
+
* (the character and block devices of the host's `/dev` when the container is created, as nerdctl gives them; a
|
|
98
|
+
* device plugged later needs a bind of `/dev`), `/sys` and `/sys/fs/cgroup` writable, no masked paths, no seccomp
|
|
99
|
+
* filter and no `no_new_privs`.
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
privileged?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Mount the container's root file system read only (its mounts, tmpfs and volumes stay writable).
|
|
105
|
+
* @default false
|
|
106
|
+
*/
|
|
107
|
+
readonlyRootfs?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* The Linux capabilities added to the default ones (the 14 Docker gives: `CHOWN`, `DAC_OVERRIDE`, `FSETID`,
|
|
110
|
+
* `FOWNER`, `MKNOD`, `NET_RAW`, `SETGID`, `SETUID`, `SETFCAP`, `SETPCAP`, `NET_BIND_SERVICE`, `SYS_CHROOT`, `KILL`,
|
|
111
|
+
* `AUDIT_WRITE`), with or without the `CAP_` prefix, in any case (`'NET_ADMIN'`, `'cap_sys_time'`); `'ALL'` adds
|
|
112
|
+
* them all. Added after `capabilitiesDrop` is applied. Unlike the Docker component, the names are not checked
|
|
113
|
+
* against a list.
|
|
114
|
+
*/
|
|
115
|
+
capabilities?: string[];
|
|
116
|
+
/**
|
|
117
|
+
* The Linux capabilities removed from the default ones, with or without the `CAP_` prefix (`'NET_RAW'`); `'ALL'`
|
|
118
|
+
* removes them all, before `capabilities` adds its ones.
|
|
119
|
+
*/
|
|
120
|
+
capabilitiesDrop?: string[];
|
|
121
|
+
/**
|
|
122
|
+
* The seccomp profile filtering the system calls of the container: `'default'`, the default profile of containerd
|
|
123
|
+
* and nerdctl (the system calls allowed by the container's capabilities), applied when the kernel supports seccomp;
|
|
124
|
+
* `'unconfined'`, no filter; or the path of a JSON file holding an OCI seccomp profile (the `linux.seccomp` object
|
|
125
|
+
* of a runtime specification), read when the container is created. Privileged containers have no filter.
|
|
126
|
+
* @default 'default'
|
|
127
|
+
*/
|
|
128
|
+
seccompProfile?: 'default' | 'unconfined' | string;
|
|
129
|
+
/**
|
|
130
|
+
* The host directories and files mounted into the container. Each needs `hostPath` and `containerPath`; `rw`
|
|
131
|
+
* defaults to `true`, `propagation` to `'rprivate'`.
|
|
132
|
+
*/
|
|
133
|
+
binds?: ContainerdBind[];
|
|
134
|
+
/**
|
|
135
|
+
* The named volumes mounted into the container, created empty when they do not exist ({@link ContainerdVolume}).
|
|
136
|
+
* Each needs `volumeName` (`[a-zA-Z0-9][a-zA-Z0-9_.-]*`) and `containerPath`.
|
|
137
|
+
*/
|
|
138
|
+
volumes?: ContainerdVolume[];
|
|
139
|
+
/**
|
|
140
|
+
* The tmpfs mounted into the container ({@link ContainerdTmpfs}). Each needs `containerPath`; `size` is a positive
|
|
141
|
+
* integer of bytes, `mode` three or four octal digits.
|
|
142
|
+
*/
|
|
143
|
+
tmpfs?: ContainerdTmpfs[];
|
|
144
|
+
/**
|
|
145
|
+
* The host devices given to the container ({@link ContainerdDevice}): a device node, or a directory of them. Each
|
|
146
|
+
* needs `hostPath`; `cgroupPermissions` is one to three of `r`, `w` and `m`, each at most once, in any order
|
|
147
|
+
* (`'rw'`, `'mr'`), `'rwm'` by default.
|
|
148
|
+
*/
|
|
149
|
+
devices?: ContainerdDevice[];
|
|
150
|
+
/**
|
|
151
|
+
* The devices the container's cgroup allows besides the ones given, as Docker's `--device-cgroup-rule` writes them:
|
|
152
|
+
* a type (`c` character, `b` block, `a` all), the major and minor numbers or `*`, the access (one to three of `r`,
|
|
153
|
+
* `w`, `m`, each at most once): `"c 188:* rwm"` for the USB serial ports. They let the container use the devices
|
|
154
|
+
* plugged after its start, with a bind of `/dev` (or of `/dev/serial`, `/dev/bus/usb`).
|
|
155
|
+
*/
|
|
156
|
+
deviceCgroupRules?: string[];
|
|
157
|
+
/**
|
|
158
|
+
* The network of a container without `networks`: `'host'`, the host's network stack, or `'none'`, a network
|
|
159
|
+
* namespace with only its loopback. Ignored when `networks` is given. Without both, the container joins the default
|
|
160
|
+
* CNI network `bridge`, as with Docker and nerdctl (its ports published there; the CNI plugins needed).
|
|
161
|
+
* @default the network `bridge`
|
|
162
|
+
*/
|
|
163
|
+
network?: 'host' | 'none';
|
|
164
|
+
/**
|
|
165
|
+
* The CNI networks the container joins, in order (its interfaces `eth0`, `eth1`…): `'bridge'`, the default nerdctl
|
|
166
|
+
* network (`10.4.0.0/24`, created when first used), or one created by {@link Containerd.createNetwork}. Each needs
|
|
167
|
+
* `networkName`, of an existing network other than `host` and `none` (a missing one throws
|
|
168
|
+
* {@link ContainerdNetworkNotFoundException}), given once; `ip` and `ipv6` set its address on the network (`''` or
|
|
169
|
+
* absent: one given by the network's IPAM). Requires the CNI plugins in the component's `cniPath`.
|
|
170
|
+
*/
|
|
171
|
+
networks?: {
|
|
172
|
+
networkName: string;
|
|
173
|
+
ip?: string;
|
|
174
|
+
ipv6?: string;
|
|
175
|
+
}[];
|
|
176
|
+
/**
|
|
177
|
+
* The container ports published on the host, by the CNI `portmap` plugin on its first network: it needs `networks`
|
|
178
|
+
* (ports on the host or `none` network fail the creation). Each needs `port`, the container port, and `hostPorts`,
|
|
179
|
+
* one or more host ports forwarding to it; `type` is `'tcp'` (the default), `'udp'` or `'sctp'`; `hostIP` limits
|
|
180
|
+
* them to one host address (all of them by default). Unlike the Docker component, `hostPorts` is required and
|
|
181
|
+
* `type` is optional.
|
|
182
|
+
*/
|
|
183
|
+
ports?: {
|
|
184
|
+
port: number;
|
|
185
|
+
type?: 'tcp' | 'udp' | 'sctp';
|
|
186
|
+
hostPorts: number[];
|
|
187
|
+
hostIP?: string;
|
|
188
|
+
}[];
|
|
189
|
+
/**
|
|
190
|
+
* `'host'` shares the host's PID namespace (the container sees the host processes); a namespace of its own when
|
|
191
|
+
* not given.
|
|
192
|
+
*/
|
|
193
|
+
pidMode?: 'host';
|
|
194
|
+
/**
|
|
195
|
+
* `'host'` shares the host's IPC namespace (its shared memory and message queues); a namespace of its own when not
|
|
196
|
+
* given.
|
|
197
|
+
*/
|
|
198
|
+
ipcMode?: 'host';
|
|
199
|
+
/**
|
|
200
|
+
* The cgroup namespace: `'private'`, one of its own (its cgroup seen as the root of its `/sys/fs/cgroup`), applied
|
|
201
|
+
* on cgroup v2 hosts only; `'host'`, the host's one.
|
|
202
|
+
* @default 'private'
|
|
203
|
+
*/
|
|
204
|
+
cgroupns?: 'private' | 'host';
|
|
205
|
+
/**
|
|
206
|
+
* The memory limit in bytes, a non-negative integer; `0` or absent for no limit. With it, the swap is limited too
|
|
207
|
+
* (see `memorySwap`).
|
|
208
|
+
*/
|
|
209
|
+
memoryLimit?: number;
|
|
210
|
+
/**
|
|
211
|
+
* The limit of the memory and the swap together in bytes, as Docker's and nerdctl's `--memory-swap`: at least
|
|
212
|
+
* `memoryLimit` (equal to it, no swap), or `-1` for unlimited swap. `0` or absent with `memoryLimit`: twice
|
|
213
|
+
* `memoryLimit` (as much swap as memory). A positive value needs `memoryLimit`: without it, the options are
|
|
214
|
+
* refused. Discarded when the kernel does not limit the swap of the cgroups (as Docker discards it).
|
|
215
|
+
*/
|
|
216
|
+
memorySwap?: number;
|
|
217
|
+
/**
|
|
218
|
+
* The CPUs the container uses at most, a positive number (`1.5`): a CFS quota of `cpus × 100000` µs per period of
|
|
219
|
+
* 100000 µs. No limit by default.
|
|
220
|
+
*/
|
|
221
|
+
cpus?: number;
|
|
222
|
+
/**
|
|
223
|
+
* The relative CPU weight of the container against the others when the CPUs are busy, in cgroup v1 CPU shares
|
|
224
|
+
* (`1024` is the kernel's default; runc converts them to a `cpu.weight` on cgroup v2). A positive integer; the
|
|
225
|
+
* kernel's default when not given.
|
|
226
|
+
*/
|
|
227
|
+
cpuShares?: number;
|
|
228
|
+
/**
|
|
229
|
+
* The CPUs the container may run on, by their numbers (`[0, 1]`); all of them by default.
|
|
230
|
+
*/
|
|
231
|
+
cpuSet?: number[];
|
|
232
|
+
/**
|
|
233
|
+
* The processes (and threads) the container may have at most, a positive integer; no limit by default.
|
|
234
|
+
*/
|
|
235
|
+
pidsLimit?: number;
|
|
236
|
+
/**
|
|
237
|
+
* Disable the kernel's OOM killer for the container: its processes wait for memory instead of being killed at its
|
|
238
|
+
* memory limit. Supported on cgroup v1 only.
|
|
239
|
+
* @default false
|
|
240
|
+
*/
|
|
241
|
+
OOMKillDisable?: boolean;
|
|
242
|
+
/**
|
|
243
|
+
* The kernel parameters set in the container's namespaces (`{'net.ipv4.ip_forward': '1'}`); runc accepts only the
|
|
244
|
+
* namespaced ones (`net.*` outside the host network, `kernel.shm*`, `kernel.msg*`, `fs.mqueue.*`…).
|
|
245
|
+
*/
|
|
246
|
+
sysctls?: Record<string, string>;
|
|
247
|
+
/**
|
|
248
|
+
* The size of the container's `/dev/shm` in bytes, a positive integer.
|
|
249
|
+
* @default 67108864
|
|
250
|
+
*/
|
|
251
|
+
shmSize?: number;
|
|
252
|
+
/**
|
|
253
|
+
* The restart policy, applied by containerd's restart monitor ({@link ContainerdRestartPolicy}): `''` or `'no'`,
|
|
254
|
+
* `'always'`, `'unless-stopped'`, `'on-failure'`, `'on-failure:N'`. Never restarted by default.
|
|
255
|
+
*/
|
|
256
|
+
restartPolicy?: ContainerdRestartPolicy;
|
|
257
|
+
/**
|
|
258
|
+
* The signal `stop()` sends first (`'SIGTERM'`, `'SIGQUIT'`, `'TERM'`, `'15'`); the image's stop signal by default,
|
|
259
|
+
* `SIGTERM` without it.
|
|
260
|
+
*/
|
|
261
|
+
stopSignal?: string;
|
|
262
|
+
/**
|
|
263
|
+
* The host names added to the container's `/etc/hosts`, each mapped to an IP address
|
|
264
|
+
* (`{'db.local': '10.4.1.5'}`).
|
|
265
|
+
*/
|
|
266
|
+
extraHosts?: Record<string, string>;
|
|
267
|
+
/**
|
|
268
|
+
* The IP addresses of the name servers of the container's `/etc/resolv.conf`, replacing the host's. By default,
|
|
269
|
+
* the host's `/etc/resolv.conf`, without its loopback name servers outside the host network (and with `8.8.8.8`
|
|
270
|
+
* and `8.8.4.4` when none is left, as Docker does).
|
|
271
|
+
*/
|
|
272
|
+
dns?: string[];
|
|
273
|
+
}
|