@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,38 @@
|
|
|
1
|
+
import { DTO } from '@lakutata/core';
|
|
2
|
+
/**
|
|
3
|
+
* How {@link Containerd.importImage} loads the images of a tar archive into containerd, returning them: an OCI image
|
|
4
|
+
* layout (the archive of {@link ImageExportOptions}, `nerdctl save`, `docker save` of Docker 25+), or an archive of an
|
|
5
|
+
* older `docker save`. `source` is required. An archive with no image throws {@link ContainerdImageImportException}.
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import {createReadStream} from 'node:fs'
|
|
9
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
10
|
+
*
|
|
11
|
+
* declare const containerd: Containerd
|
|
12
|
+
*
|
|
13
|
+
* const images = await containerd.importImage({source: '/backup/images.tar'})
|
|
14
|
+
* //Or from a stream (an upload, a download), under another name
|
|
15
|
+
* const [copy] = await containerd.importImage({source: createReadStream('/backup/nginx.tar'), name: 'nginx:backup'})
|
|
16
|
+
* console.log(images.map(image => image.name), copy.name)
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class ImageImportOptions extends DTO {
|
|
20
|
+
/**
|
|
21
|
+
* The archive: the path of a file, or a readable stream of it. Required.
|
|
22
|
+
*/
|
|
23
|
+
source: string | NodeJS.ReadableStream;
|
|
24
|
+
/**
|
|
25
|
+
* The name given to the imported image (`'app:1.0'`, normalized to `'docker.io/library/app:1.0'`), instead of the
|
|
26
|
+
* names the archive has. Only for an archive of one image (its tags count as one): an archive of several images
|
|
27
|
+
* given a name throws {@link ContainerdImageImportException}, nothing imported. By default, the archive's names; an
|
|
28
|
+
* older `docker save` image without one is named `import-<milliseconds>@<digest>`.
|
|
29
|
+
*/
|
|
30
|
+
name?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Unpack the images' layers into snapshots, for the platforms the machine runs
|
|
33
|
+
* ({@link Containerd.supportedPlatforms}), so that their containers are created at once. A failure to unpack fails the import with
|
|
34
|
+
* {@link ContainerdImageImportException}, the images stored and named.
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
unpack?: boolean;
|
|
38
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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.ImageImportOptions = void 0;
|
|
13
|
+
const core_1 = require("@lakutata/core");
|
|
14
|
+
const dto_1 = require("@lakutata/core/decorator/dto");
|
|
15
|
+
const node_stream_1 = require("node:stream");
|
|
16
|
+
/**
|
|
17
|
+
* How {@link Containerd.importImage} loads the images of a tar archive into containerd, returning them: an OCI image
|
|
18
|
+
* layout (the archive of {@link ImageExportOptions}, `nerdctl save`, `docker save` of Docker 25+), or an archive of an
|
|
19
|
+
* older `docker save`. `source` is required. An archive with no image throws {@link ContainerdImageImportException}.
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import {createReadStream} from 'node:fs'
|
|
23
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
24
|
+
*
|
|
25
|
+
* declare const containerd: Containerd
|
|
26
|
+
*
|
|
27
|
+
* const images = await containerd.importImage({source: '/backup/images.tar'})
|
|
28
|
+
* //Or from a stream (an upload, a download), under another name
|
|
29
|
+
* const [copy] = await containerd.importImage({source: createReadStream('/backup/nginx.tar'), name: 'nginx:backup'})
|
|
30
|
+
* console.log(images.map(image => image.name), copy.name)
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
class ImageImportOptions extends core_1.DTO {
|
|
34
|
+
}
|
|
35
|
+
exports.ImageImportOptions = ImageImportOptions;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, dto_1.Expect)(core_1.DTO.Alternatives(core_1.DTO.String(), core_1.DTO.InstanceOf(node_stream_1.Stream)).required()),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], ImageImportOptions.prototype, "source", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, dto_1.Expect)(core_1.DTO.String().optional()),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ImageImportOptions.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, dto_1.Expect)(core_1.DTO.Boolean().optional().default(true)),
|
|
46
|
+
__metadata("design:type", Boolean)
|
|
47
|
+
], ImageImportOptions.prototype, "unpack", void 0);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { DTO } from '@lakutata/core';
|
|
2
|
+
import { ContainerdRegistryAuthOptions } from '../ContainerdRegistryAuthOptions.js';
|
|
3
|
+
import type { ContainerdProgressCallback } from '../../types/ContainerdProgressCallback.js';
|
|
4
|
+
/**
|
|
5
|
+
* How {@link Containerd.pullImage} pulls an image from its registry into containerd, returning it: the manifests of the
|
|
6
|
+
* platforms asked, their configurations and their layers. Only `image` is required. A failure throws
|
|
7
|
+
* {@link ContainerdImagePullException}; a platform the image does not have throws {@link ContainerdPlatformException}.
|
|
8
|
+
* The registries in the component's `insecureRegistries` are accessed over HTTP. Unlike the Docker component's options,
|
|
9
|
+
* the image is one reference (no `repo` and `tag`), several platforms can be pulled, and the progress is reported per
|
|
10
|
+
* blob in bytes.
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
14
|
+
*
|
|
15
|
+
* declare const containerd: Containerd
|
|
16
|
+
*
|
|
17
|
+
* const image = await containerd.pullImage({
|
|
18
|
+
* image: 'alpine:3.20',
|
|
19
|
+
* platform: ['linux/amd64', 'linux/arm64'],
|
|
20
|
+
* progressCallback: ({digest, current, total}): void => console.log(digest, current, '/', total)
|
|
21
|
+
* })
|
|
22
|
+
* console.log(image.name, image.platforms)
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare class ImagePullOptions extends DTO {
|
|
26
|
+
/**
|
|
27
|
+
* The image reference (`'alpine'`, `'alpine:3.20'`, `'registry.example.com:5000/app@sha256:…'`), normalized as
|
|
28
|
+
* Docker does (`'docker.io/library/alpine:latest'`), the tag `latest` when it has neither a tag nor a digest. The
|
|
29
|
+
* image is named by it in containerd. Required.
|
|
30
|
+
*/
|
|
31
|
+
image: string;
|
|
32
|
+
/**
|
|
33
|
+
* The platforms pulled: one (`'linux/arm64'`, `'linux/arm/v7'`, `'arm64'` for `linux/arm64`) or several, or
|
|
34
|
+
* `'all'` for every platform of the image. The machine's platform by default.
|
|
35
|
+
*/
|
|
36
|
+
platform?: string | string[];
|
|
37
|
+
/**
|
|
38
|
+
* The credentials of the image's registry; the component's credentials of that registry (`registryAuths`) by
|
|
39
|
+
* default, anonymous without them.
|
|
40
|
+
*/
|
|
41
|
+
auth?: ContainerdRegistryAuthOptions;
|
|
42
|
+
/**
|
|
43
|
+
* Unpack the layers into snapshots, for the platforms pulled that the machine runs
|
|
44
|
+
* ({@link Containerd.supportedPlatforms}: its own and the ones of its emulators), so that their containers are
|
|
45
|
+
* created at once; the other platforms are only stored. Without it, a container creation unpacks them.
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
unpack?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Receive the download progress of each blob ({@link ContainerdProgressCallback}).
|
|
51
|
+
*/
|
|
52
|
+
progressCallback?: ContainerdProgressCallback;
|
|
53
|
+
}
|
|
@@ -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.ImagePullOptions = void 0;
|
|
13
|
+
const core_1 = require("@lakutata/core");
|
|
14
|
+
const dto_1 = require("@lakutata/core/decorator/dto");
|
|
15
|
+
const ContainerdRegistryAuthOptions_js_1 = require("../ContainerdRegistryAuthOptions.js");
|
|
16
|
+
/**
|
|
17
|
+
* How {@link Containerd.pullImage} pulls an image from its registry into containerd, returning it: the manifests of the
|
|
18
|
+
* platforms asked, their configurations and their layers. Only `image` is required. A failure throws
|
|
19
|
+
* {@link ContainerdImagePullException}; a platform the image does not have throws {@link ContainerdPlatformException}.
|
|
20
|
+
* The registries in the component's `insecureRegistries` are accessed over HTTP. Unlike the Docker component's options,
|
|
21
|
+
* the image is one reference (no `repo` and `tag`), several platforms can be pulled, and the progress is reported per
|
|
22
|
+
* blob in bytes.
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
26
|
+
*
|
|
27
|
+
* declare const containerd: Containerd
|
|
28
|
+
*
|
|
29
|
+
* const image = await containerd.pullImage({
|
|
30
|
+
* image: 'alpine:3.20',
|
|
31
|
+
* platform: ['linux/amd64', 'linux/arm64'],
|
|
32
|
+
* progressCallback: ({digest, current, total}): void => console.log(digest, current, '/', total)
|
|
33
|
+
* })
|
|
34
|
+
* console.log(image.name, image.platforms)
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
class ImagePullOptions extends core_1.DTO {
|
|
38
|
+
}
|
|
39
|
+
exports.ImagePullOptions = ImagePullOptions;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, dto_1.Expect)(core_1.DTO.String().required()),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ImagePullOptions.prototype, "image", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, dto_1.Expect)(core_1.DTO.Alternatives(core_1.DTO.String(), core_1.DTO.Array(core_1.DTO.String()).min(1)).optional()),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], ImagePullOptions.prototype, "platform", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, dto_1.Expect)(ContainerdRegistryAuthOptions_js_1.ContainerdRegistryAuthOptions.optional()),
|
|
50
|
+
__metadata("design:type", ContainerdRegistryAuthOptions_js_1.ContainerdRegistryAuthOptions
|
|
51
|
+
/**
|
|
52
|
+
* Unpack the layers into snapshots, for the platforms pulled that the machine runs
|
|
53
|
+
* ({@link Containerd.supportedPlatforms}: its own and the ones of its emulators), so that their containers are
|
|
54
|
+
* created at once; the other platforms are only stored. Without it, a container creation unpacks them.
|
|
55
|
+
* @default true
|
|
56
|
+
*/
|
|
57
|
+
)
|
|
58
|
+
], ImagePullOptions.prototype, "auth", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, dto_1.Expect)(core_1.DTO.Boolean().optional().default(true)),
|
|
61
|
+
__metadata("design:type", Boolean)
|
|
62
|
+
], ImagePullOptions.prototype, "unpack", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, dto_1.Expect)(core_1.DTO.Function().optional()),
|
|
65
|
+
__metadata("design:type", Function)
|
|
66
|
+
], ImagePullOptions.prototype, "progressCallback", void 0);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DTO } from '@lakutata/core';
|
|
2
|
+
import { ContainerdRegistryAuthOptions } from '../ContainerdRegistryAuthOptions.js';
|
|
3
|
+
import type { ContainerdProgressCallback } from '../../types/ContainerdProgressCallback.js';
|
|
4
|
+
/**
|
|
5
|
+
* Where and how {@link ContainerdImage.push} pushes an image to a registry: an image of one manifest as it is; the
|
|
6
|
+
* manifest of `platform` when it is given; else the whole index of a multi-platform image when the content store has
|
|
7
|
+
* all its platforms, the manifest of the machine's platform otherwise. Every field is optional. A failure throws
|
|
8
|
+
* {@link ContainerdImagePushException}. The registries in the component's `insecureRegistries` are accessed over HTTP.
|
|
9
|
+
* Unlike the Docker component's options, the destination is one reference (no `repo` and `tag`), the image is not
|
|
10
|
+
* tagged with it in containerd, and the identity tokens are sent.
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
14
|
+
*
|
|
15
|
+
* declare const containerd: Containerd
|
|
16
|
+
*
|
|
17
|
+
* const image = await containerd.getImage('app:1.0')
|
|
18
|
+
* await image.push({
|
|
19
|
+
* reference: 'registry.example.com:5000/team/app:1.0',
|
|
20
|
+
* auth: {username: 'ci', password: process.env.REGISTRY_TOKEN ?? ''}
|
|
21
|
+
* })
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class ImagePushOptions extends DTO {
|
|
25
|
+
/**
|
|
26
|
+
* The reference pushed to (`'registry.example.com:5000/team/app:1.0'`); the image's name by default.
|
|
27
|
+
*/
|
|
28
|
+
reference?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The platform whose manifest alone is pushed under the reference (`'linux/arm64'`), even when the content store
|
|
31
|
+
* has all the platforms of the image's index. Without it, the whole index is pushed when all its platforms are
|
|
32
|
+
* present, else the machine's platform. An image without the platform throws {@link ContainerdPlatformException}.
|
|
33
|
+
*/
|
|
34
|
+
platform?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The credentials of the registry of the reference; the component's credentials of that registry
|
|
37
|
+
* (`registryAuths`) by default.
|
|
38
|
+
*/
|
|
39
|
+
auth?: ContainerdRegistryAuthOptions;
|
|
40
|
+
/**
|
|
41
|
+
* Receive the upload progress ({@link ContainerdProgressCallback}): once per blob, after its upload.
|
|
42
|
+
*/
|
|
43
|
+
progressCallback?: ContainerdProgressCallback;
|
|
44
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.ImagePushOptions = void 0;
|
|
13
|
+
const core_1 = require("@lakutata/core");
|
|
14
|
+
const dto_1 = require("@lakutata/core/decorator/dto");
|
|
15
|
+
const ContainerdRegistryAuthOptions_js_1 = require("../ContainerdRegistryAuthOptions.js");
|
|
16
|
+
/**
|
|
17
|
+
* Where and how {@link ContainerdImage.push} pushes an image to a registry: an image of one manifest as it is; the
|
|
18
|
+
* manifest of `platform` when it is given; else the whole index of a multi-platform image when the content store has
|
|
19
|
+
* all its platforms, the manifest of the machine's platform otherwise. Every field is optional. A failure throws
|
|
20
|
+
* {@link ContainerdImagePushException}. The registries in the component's `insecureRegistries` are accessed over HTTP.
|
|
21
|
+
* Unlike the Docker component's options, the destination is one reference (no `repo` and `tag`), the image is not
|
|
22
|
+
* tagged with it in containerd, and the identity tokens are sent.
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
26
|
+
*
|
|
27
|
+
* declare const containerd: Containerd
|
|
28
|
+
*
|
|
29
|
+
* const image = await containerd.getImage('app:1.0')
|
|
30
|
+
* await image.push({
|
|
31
|
+
* reference: 'registry.example.com:5000/team/app:1.0',
|
|
32
|
+
* auth: {username: 'ci', password: process.env.REGISTRY_TOKEN ?? ''}
|
|
33
|
+
* })
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
class ImagePushOptions extends core_1.DTO {
|
|
37
|
+
}
|
|
38
|
+
exports.ImagePushOptions = ImagePushOptions;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, dto_1.Expect)(core_1.DTO.String().optional()),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ImagePushOptions.prototype, "reference", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, dto_1.Expect)(core_1.DTO.String().optional()),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], ImagePushOptions.prototype, "platform", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, dto_1.Expect)(ContainerdRegistryAuthOptions_js_1.ContainerdRegistryAuthOptions.optional()),
|
|
49
|
+
__metadata("design:type", ContainerdRegistryAuthOptions_js_1.ContainerdRegistryAuthOptions
|
|
50
|
+
/**
|
|
51
|
+
* Receive the upload progress ({@link ContainerdProgressCallback}): once per blob, after its upload.
|
|
52
|
+
*/
|
|
53
|
+
)
|
|
54
|
+
], ImagePushOptions.prototype, "auth", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, dto_1.Expect)(core_1.DTO.Function().optional()),
|
|
57
|
+
__metadata("design:type", Function)
|
|
58
|
+
], ImagePushOptions.prototype, "progressCallback", void 0);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { DTO } from '@lakutata/core';
|
|
2
|
+
/**
|
|
3
|
+
* A CNI network {@link Containerd.createNetwork} creates, as `nerdctl network create` does: its configuration list
|
|
4
|
+
* `nerdctl-<name>.conflist` written to the component's `cniConfigPath` (nerdctl sees it), its main plugin followed by
|
|
5
|
+
* `portmap`, and `firewall` and `tuning` when they are installed. Containers join it by
|
|
6
|
+
* {@link ContainerCreateOptions.networks}. Only `name` is required. A name or a subnet in use throws
|
|
7
|
+
* {@link ContainerdNetworkConflictException}. Unlike the Docker component's options, the IPAM settings are flat fields
|
|
8
|
+
* (one IPv4 subnet, one IPv6 subnet), and IPv6 is enabled by giving its subnet.
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
12
|
+
*
|
|
13
|
+
* declare const containerd: Containerd
|
|
14
|
+
*
|
|
15
|
+
* const network = await containerd.createNetwork({
|
|
16
|
+
* name: 'backend',
|
|
17
|
+
* subnet: '10.20.0.0/24',
|
|
18
|
+
* ipRange: '10.20.0.128/25',
|
|
19
|
+
* labels: {project: 'shop'}
|
|
20
|
+
* })
|
|
21
|
+
* await containerd.createContainer({image: 'redis:7', networks: [{networkName: network.name, ip: '10.20.0.10'}]})
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class NetworkCreateOptions extends DTO {
|
|
25
|
+
/**
|
|
26
|
+
* The name of the network, matching `[a-zA-Z0-9][a-zA-Z0-9_.-]*`; not `host`, `none` nor `bridge` (the default
|
|
27
|
+
* nerdctl network). Required.
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* The main CNI plugin, installed in the component's `cniPath`: `'bridge'`, a Linux bridge (`br-<12 digits of its
|
|
32
|
+
* ID>`) with NAT to the outside; `'macvlan'` (bridge mode) or `'ipvlan'` (L2 mode), the containers on the network
|
|
33
|
+
* of the host interface `parent`.
|
|
34
|
+
* @default 'bridge'
|
|
35
|
+
*/
|
|
36
|
+
driver?: 'bridge' | 'ipvlan' | 'macvlan';
|
|
37
|
+
/**
|
|
38
|
+
* The IPv4 subnet in CIDR notation (`'10.20.0.0/24'`), overlapping no other network's. By default, the first free
|
|
39
|
+
* `/24` of `10.4.0.0/16` (the nerdctl range, `10.4.0.0/24` being the default network's).
|
|
40
|
+
*/
|
|
41
|
+
subnet?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The IPv4 gateway, an address of the subnet without a prefix length (`'10.20.0.254'`); the first address of the
|
|
44
|
+
* subnet by default.
|
|
45
|
+
*/
|
|
46
|
+
gateway?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The range the container addresses are given from, in CIDR notation inside the subnet (`'10.20.0.128/25'`); the
|
|
49
|
+
* whole subnet by default.
|
|
50
|
+
*/
|
|
51
|
+
ipRange?: string;
|
|
52
|
+
/**
|
|
53
|
+
* The host interface (`'eth0'`) a `macvlan` or `ipvlan` network is attached to, required by them; ignored by
|
|
54
|
+
* `bridge`.
|
|
55
|
+
*/
|
|
56
|
+
parent?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Cut the network from the outside: no default route in the containers and, for a bridge, no gateway on the host
|
|
59
|
+
* and no masquerading.
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
internal?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* The MTU of the container interfaces in bytes, at least `68`; the plugin's default (the host's, `1500` usually)
|
|
65
|
+
* when not given.
|
|
66
|
+
*/
|
|
67
|
+
mtu?: number;
|
|
68
|
+
/**
|
|
69
|
+
* An IPv6 subnet in CIDR notation (`'fd00:4:10::/64'`), besides the IPv4 one, overlapping no other network's; the
|
|
70
|
+
* network has no IPv6 without it.
|
|
71
|
+
*/
|
|
72
|
+
ipv6Subnet?: string;
|
|
73
|
+
/**
|
|
74
|
+
* The IPv6 gateway, an address of `ipv6Subnet` without a prefix length; the first address of the subnet by
|
|
75
|
+
* default. Ignored without `ipv6Subnet`.
|
|
76
|
+
*/
|
|
77
|
+
ipv6Gateway?: string;
|
|
78
|
+
/**
|
|
79
|
+
* The labels of the network, written to its configuration.
|
|
80
|
+
*/
|
|
81
|
+
labels?: Record<string, string>;
|
|
82
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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.NetworkCreateOptions = void 0;
|
|
13
|
+
const core_1 = require("@lakutata/core");
|
|
14
|
+
const dto_1 = require("@lakutata/core/decorator/dto");
|
|
15
|
+
/**
|
|
16
|
+
* A CNI network {@link Containerd.createNetwork} creates, as `nerdctl network create` does: its configuration list
|
|
17
|
+
* `nerdctl-<name>.conflist` written to the component's `cniConfigPath` (nerdctl sees it), its main plugin followed by
|
|
18
|
+
* `portmap`, and `firewall` and `tuning` when they are installed. Containers join it by
|
|
19
|
+
* {@link ContainerCreateOptions.networks}. Only `name` is required. A name or a subnet in use throws
|
|
20
|
+
* {@link ContainerdNetworkConflictException}. Unlike the Docker component's options, the IPAM settings are flat fields
|
|
21
|
+
* (one IPv4 subnet, one IPv6 subnet), and IPv6 is enabled by giving its subnet.
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
25
|
+
*
|
|
26
|
+
* declare const containerd: Containerd
|
|
27
|
+
*
|
|
28
|
+
* const network = await containerd.createNetwork({
|
|
29
|
+
* name: 'backend',
|
|
30
|
+
* subnet: '10.20.0.0/24',
|
|
31
|
+
* ipRange: '10.20.0.128/25',
|
|
32
|
+
* labels: {project: 'shop'}
|
|
33
|
+
* })
|
|
34
|
+
* await containerd.createContainer({image: 'redis:7', networks: [{networkName: network.name, ip: '10.20.0.10'}]})
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
class NetworkCreateOptions extends core_1.DTO {
|
|
38
|
+
}
|
|
39
|
+
exports.NetworkCreateOptions = NetworkCreateOptions;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, dto_1.Expect)(core_1.DTO.String().pattern(/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/).required()),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], NetworkCreateOptions.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, dto_1.Expect)(core_1.DTO.String().valid('bridge', 'ipvlan', 'macvlan').optional().default('bridge')),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], NetworkCreateOptions.prototype, "driver", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, dto_1.Expect)(core_1.DTO.String().ip({ version: 'ipv4', cidr: 'required' }).optional()),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], NetworkCreateOptions.prototype, "subnet", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, dto_1.Expect)(core_1.DTO.String().ip({ version: 'ipv4', cidr: 'forbidden' }).optional()),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], NetworkCreateOptions.prototype, "gateway", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, dto_1.Expect)(core_1.DTO.String().ip({ version: 'ipv4', cidr: 'required' }).optional()),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], NetworkCreateOptions.prototype, "ipRange", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, dto_1.Expect)(core_1.DTO.String().optional()),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], NetworkCreateOptions.prototype, "parent", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, dto_1.Expect)(core_1.DTO.Boolean().optional()),
|
|
66
|
+
__metadata("design:type", Boolean)
|
|
67
|
+
], NetworkCreateOptions.prototype, "internal", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, dto_1.Expect)(core_1.DTO.Number().integer().min(68).optional()),
|
|
70
|
+
__metadata("design:type", Number)
|
|
71
|
+
], NetworkCreateOptions.prototype, "mtu", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, dto_1.Expect)(core_1.DTO.String().ip({ version: 'ipv6', cidr: 'required' }).optional()),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], NetworkCreateOptions.prototype, "ipv6Subnet", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, dto_1.Expect)(core_1.DTO.String().ip({ version: 'ipv6', cidr: 'forbidden' }).optional()),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], NetworkCreateOptions.prototype, "ipv6Gateway", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, dto_1.Expect)(core_1.DTO.Object().pattern(core_1.DTO.String(), core_1.DTO.String().allow('')).optional()),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], NetworkCreateOptions.prototype, "labels", void 0);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DTO } from '@lakutata/core';
|
|
2
|
+
/**
|
|
3
|
+
* A named volume {@link Containerd.createVolume} creates: an empty directory of the component's data root
|
|
4
|
+
* (`<dataRoot>/volumes/<namespace>/<name>/_data`), which containers mount by {@link ContainerCreateOptions.volumes}.
|
|
5
|
+
* It is not a nerdctl volume. When the volume exists, it is returned unchanged (its labels kept), as Docker does. Only
|
|
6
|
+
* `name` is required.
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
10
|
+
*
|
|
11
|
+
* declare const containerd: Containerd
|
|
12
|
+
*
|
|
13
|
+
* const volume = await containerd.createVolume({name: 'pgdata', labels: {project: 'shop'}})
|
|
14
|
+
* await containerd.createContainer({image: 'postgres:16', volumes: [{volumeName: volume.name, containerPath: '/var/lib/postgresql/data'}]})
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare class VolumeCreateOptions extends DTO {
|
|
18
|
+
/**
|
|
19
|
+
* The name of the volume, matching `[a-zA-Z0-9][a-zA-Z0-9_.-]*`. Required.
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* The labels of the volume, kept with it ({@link ContainerdVolumeInfo.labels}); ignored when it exists.
|
|
24
|
+
*/
|
|
25
|
+
labels?: Record<string, string>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.VolumeCreateOptions = void 0;
|
|
13
|
+
const core_1 = require("@lakutata/core");
|
|
14
|
+
const dto_1 = require("@lakutata/core/decorator/dto");
|
|
15
|
+
/**
|
|
16
|
+
* A named volume {@link Containerd.createVolume} creates: an empty directory of the component's data root
|
|
17
|
+
* (`<dataRoot>/volumes/<namespace>/<name>/_data`), which containers mount by {@link ContainerCreateOptions.volumes}.
|
|
18
|
+
* It is not a nerdctl volume. When the volume exists, it is returned unchanged (its labels kept), as Docker does. Only
|
|
19
|
+
* `name` is required.
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import {Containerd} from 'lakutata/com/containerd'
|
|
23
|
+
*
|
|
24
|
+
* declare const containerd: Containerd
|
|
25
|
+
*
|
|
26
|
+
* const volume = await containerd.createVolume({name: 'pgdata', labels: {project: 'shop'}})
|
|
27
|
+
* await containerd.createContainer({image: 'postgres:16', volumes: [{volumeName: volume.name, containerPath: '/var/lib/postgresql/data'}]})
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
class VolumeCreateOptions extends core_1.DTO {
|
|
31
|
+
}
|
|
32
|
+
exports.VolumeCreateOptions = VolumeCreateOptions;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, dto_1.Expect)(core_1.DTO.String().pattern(/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/).required()),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], VolumeCreateOptions.prototype, "name", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, dto_1.Expect)(core_1.DTO.Object().pattern(core_1.DTO.String(), core_1.DTO.String().allow('')).optional()),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], VolumeCreateOptions.prototype, "labels", void 0);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A directory or a file of the host mounted into a container (a bind mount), given to
|
|
3
|
+
* {@link ContainerCreateOptions.binds}. Unlike the Docker component's bind, `rw` is optional and the mount propagation
|
|
4
|
+
* can be set.
|
|
5
|
+
*/
|
|
6
|
+
export type ContainerdBind = {
|
|
7
|
+
/**
|
|
8
|
+
* The path on the host, absolute or relative to the working directory of the process. A missing path is created
|
|
9
|
+
* as a directory when the container is created (as `docker run -v` does).
|
|
10
|
+
*/
|
|
11
|
+
hostPath: string;
|
|
12
|
+
/**
|
|
13
|
+
* The absolute path in the container where it is mounted; it replaces what the image has there.
|
|
14
|
+
*/
|
|
15
|
+
containerPath: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the container can write to it; `false` mounts it read only.
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
rw?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The mount propagation (how the mounts made later under the path on either side are seen by the other side):
|
|
23
|
+
* `'private'`/`'rprivate'` none, `'shared'`/`'rshared'` both ways, `'slave'`/`'rslave'` from the host into the
|
|
24
|
+
* container only. The `r` forms apply to the mounts under the path too.
|
|
25
|
+
* @default 'rprivate'
|
|
26
|
+
*/
|
|
27
|
+
propagation?: 'private' | 'rprivate' | 'shared' | 'rshared' | 'slave' | 'rslave';
|
|
28
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Receive the progress of a BuildKit build ({@link ImageBuildOptions.outputCallback}), one line per call, as
|
|
3
|
+
* `docker build --progress=plain` prints it: the steps numbered in their order (`"#3 [2/2] RUN npm ci"`), their output,
|
|
4
|
+
* and their end (`"#3 CACHED"`, `"#3 DONE 1.2s"`, or their error). The line has no trailing newline.
|
|
5
|
+
*/
|
|
6
|
+
export type ContainerdBuildOutputCallback = (line: string) => void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The interface of a container on one of its CNI networks ({@link ContainerdContainer.networks}). Its addresses are
|
|
3
|
+
* known while the container runs (its interface exists while its task does); the strings are empty otherwise, and for
|
|
4
|
+
* the families the network has no subnet of.
|
|
5
|
+
*/
|
|
6
|
+
export type ContainerdContainerNetwork = {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the network (`'bridge'`, the default nerdctl network, or one created by
|
|
9
|
+
* {@link Containerd.createNetwork}).
|
|
10
|
+
*/
|
|
11
|
+
networkName: string;
|
|
12
|
+
/**
|
|
13
|
+
* The name of the interface in the container: `'eth0'` on its first network, `'eth1'` on the second one…
|
|
14
|
+
*/
|
|
15
|
+
interface: string;
|
|
16
|
+
/**
|
|
17
|
+
* The MAC address of the interface (`'2a:5f:…'`), `''` when unknown.
|
|
18
|
+
*/
|
|
19
|
+
mac: string;
|
|
20
|
+
/**
|
|
21
|
+
* The IPv4 address of the container on the network, `''` when it has none.
|
|
22
|
+
*/
|
|
23
|
+
ip: string;
|
|
24
|
+
/**
|
|
25
|
+
* The IPv4 gateway of the network, `''` when it has none.
|
|
26
|
+
*/
|
|
27
|
+
gateway: string;
|
|
28
|
+
/**
|
|
29
|
+
* The prefix length of the IPv4 subnet (`24` for a `/24`), `0` when the container has no IPv4 address.
|
|
30
|
+
*/
|
|
31
|
+
ipPrefixLen: number;
|
|
32
|
+
/**
|
|
33
|
+
* The IPv6 address of the container on the network, `''` when the network has no IPv6 subnet.
|
|
34
|
+
*/
|
|
35
|
+
ipv6: string;
|
|
36
|
+
/**
|
|
37
|
+
* The IPv6 gateway of the network, `''` when it has none.
|
|
38
|
+
*/
|
|
39
|
+
ipv6Gateway: string;
|
|
40
|
+
};
|