@lakutata/docker 3.0.0-beta.0

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.
Files changed (305) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +309 -0
  3. package/THIRD_PARTY_NOTICES.md +299 -0
  4. package/dist/cjs/client/BuildContext.d.ts +22 -0
  5. package/dist/cjs/client/BuildContext.js +76 -0
  6. package/dist/cjs/client/BuildKitProgress.d.ts +81 -0
  7. package/dist/cjs/client/BuildKitProgress.js +195 -0
  8. package/dist/cjs/client/DockerClient.d.ts +196 -0
  9. package/dist/cjs/client/DockerClient.js +312 -0
  10. package/dist/cjs/client/DockerConnection.d.ts +154 -0
  11. package/dist/cjs/client/DockerConnection.js +397 -0
  12. package/dist/cjs/client/DockerIgnore.d.ts +44 -0
  13. package/dist/cjs/client/DockerIgnore.js +186 -0
  14. package/dist/cjs/client/DockerRequestError.d.ts +17 -0
  15. package/dist/cjs/client/DockerRequestError.js +24 -0
  16. package/dist/cjs/client/DockerStreams.d.ts +35 -0
  17. package/dist/cjs/client/DockerStreams.js +117 -0
  18. package/dist/cjs/client/types/ContainerCreateResponse.d.ts +7 -0
  19. package/dist/cjs/client/types/ContainerCreateResponse.js +2 -0
  20. package/dist/cjs/client/types/ContainerStopQuery.d.ts +13 -0
  21. package/dist/cjs/client/types/ContainerStopQuery.js +2 -0
  22. package/dist/cjs/client/types/DeviceMapping.d.ts +8 -0
  23. package/dist/cjs/client/types/DeviceMapping.js +2 -0
  24. package/dist/cjs/client/types/IdResponse.d.ts +6 -0
  25. package/dist/cjs/client/types/IdResponse.js +2 -0
  26. package/dist/cjs/client/types/NetworkCreateResponse.d.ts +7 -0
  27. package/dist/cjs/client/types/NetworkCreateResponse.js +2 -0
  28. package/dist/cjs/client/types/PortBinding.d.ts +10 -0
  29. package/dist/cjs/client/types/PortBinding.js +2 -0
  30. package/dist/cjs/docker/ConnectionOptionsBuilder.d.ts +128 -0
  31. package/dist/cjs/docker/ConnectionOptionsBuilder.js +150 -0
  32. package/dist/cjs/docker/Docker.d.ts +301 -0
  33. package/dist/cjs/docker/Docker.js +703 -0
  34. package/dist/cjs/docker/exceptions/DockerConnectionException.d.ts +9 -0
  35. package/dist/cjs/docker/exceptions/DockerConnectionException.js +16 -0
  36. package/dist/cjs/docker/exceptions/DockerContainerNotFoundException.d.ts +9 -0
  37. package/dist/cjs/docker/exceptions/DockerContainerNotFoundException.js +16 -0
  38. package/dist/cjs/docker/exceptions/DockerImageBuildException.d.ts +9 -0
  39. package/dist/cjs/docker/exceptions/DockerImageBuildException.js +16 -0
  40. package/dist/cjs/docker/exceptions/DockerImageImportException.d.ts +9 -0
  41. package/dist/cjs/docker/exceptions/DockerImageImportException.js +16 -0
  42. package/dist/cjs/docker/exceptions/DockerImageNotFoundException.d.ts +10 -0
  43. package/dist/cjs/docker/exceptions/DockerImageNotFoundException.js +17 -0
  44. package/dist/cjs/docker/exceptions/DockerImagePullException.d.ts +9 -0
  45. package/dist/cjs/docker/exceptions/DockerImagePullException.js +16 -0
  46. package/dist/cjs/docker/exceptions/DockerImagePushException.d.ts +8 -0
  47. package/dist/cjs/docker/exceptions/DockerImagePushException.js +15 -0
  48. package/dist/cjs/docker/exceptions/DockerImageRepoTagNotFoundException.d.ts +8 -0
  49. package/dist/cjs/docker/exceptions/DockerImageRepoTagNotFoundException.js +15 -0
  50. package/dist/cjs/docker/exceptions/DockerNetworkNotFoundException.d.ts +9 -0
  51. package/dist/cjs/docker/exceptions/DockerNetworkNotFoundException.js +16 -0
  52. package/dist/cjs/docker/exceptions/DockerRequestException.d.ts +22 -0
  53. package/dist/cjs/docker/exceptions/DockerRequestException.js +24 -0
  54. package/dist/cjs/docker/interfaces/IDockerConnectionOptions.d.ts +75 -0
  55. package/dist/cjs/docker/interfaces/IDockerConnectionOptions.js +2 -0
  56. package/dist/cjs/docker/interfaces/IDockerHttpConnectionOptions.d.ts +16 -0
  57. package/dist/cjs/docker/interfaces/IDockerHttpConnectionOptions.js +2 -0
  58. package/dist/cjs/docker/interfaces/IDockerHttpsConnectionOptions.d.ts +16 -0
  59. package/dist/cjs/docker/interfaces/IDockerHttpsConnectionOptions.js +2 -0
  60. package/dist/cjs/docker/interfaces/IDockerKeyObject.d.ts +14 -0
  61. package/dist/cjs/docker/interfaces/IDockerKeyObject.js +2 -0
  62. package/dist/cjs/docker/interfaces/IDockerSSHConnectionOptions.d.ts +16 -0
  63. package/dist/cjs/docker/interfaces/IDockerSSHConnectionOptions.js +2 -0
  64. package/dist/cjs/docker/interfaces/IDockerSocketConnectionOptions.d.ts +7 -0
  65. package/dist/cjs/docker/interfaces/IDockerSocketConnectionOptions.js +2 -0
  66. package/dist/cjs/docker/lib/DockerContainer.d.ts +315 -0
  67. package/dist/cjs/docker/lib/DockerContainer.js +742 -0
  68. package/dist/cjs/docker/lib/DockerContainerTTY.d.ts +99 -0
  69. package/dist/cjs/docker/lib/DockerContainerTTY.js +157 -0
  70. package/dist/cjs/docker/lib/DockerImage.d.ts +153 -0
  71. package/dist/cjs/docker/lib/DockerImage.js +273 -0
  72. package/dist/cjs/docker/lib/EngineSettings.d.ts +41 -0
  73. package/dist/cjs/docker/lib/EngineSettings.js +86 -0
  74. package/dist/cjs/docker/lib/ParseBaseImages.d.ts +9 -0
  75. package/dist/cjs/docker/lib/ParseBaseImages.js +50 -0
  76. package/dist/cjs/docker/lib/ParseEnvToRecord.d.ts +14 -0
  77. package/dist/cjs/docker/lib/ParseEnvToRecord.js +25 -0
  78. package/dist/cjs/docker/lib/ParseRepositoryTag.d.ts +17 -0
  79. package/dist/cjs/docker/lib/ParseRepositoryTag.js +48 -0
  80. package/dist/cjs/docker/lib/RegistryAuth.d.ts +8 -0
  81. package/dist/cjs/docker/lib/RegistryAuth.js +15 -0
  82. package/dist/cjs/docker/options/DockerPruneOptions.d.ts +38 -0
  83. package/dist/cjs/docker/options/DockerPruneOptions.js +47 -0
  84. package/dist/cjs/docker/options/auth/DockerAuthOptions.d.ts +46 -0
  85. package/dist/cjs/docker/options/auth/DockerAuthOptions.js +59 -0
  86. package/dist/cjs/docker/options/container/ContainerCommitOptions.d.ts +28 -0
  87. package/dist/cjs/docker/options/container/ContainerCommitOptions.js +39 -0
  88. package/dist/cjs/docker/options/container/ContainerCreateTTYOptions.d.ts +32 -0
  89. package/dist/cjs/docker/options/container/ContainerCreateTTYOptions.js +43 -0
  90. package/dist/cjs/docker/options/container/ContainerExecOptions.d.ts +26 -0
  91. package/dist/cjs/docker/options/container/ContainerExecOptions.js +38 -0
  92. package/dist/cjs/docker/options/container/ContainerExportDirectoryOptions.d.ts +27 -0
  93. package/dist/cjs/docker/options/container/ContainerExportDirectoryOptions.js +39 -0
  94. package/dist/cjs/docker/options/container/ContainerKillOptions.d.ts +25 -0
  95. package/dist/cjs/docker/options/container/ContainerKillOptions.js +36 -0
  96. package/dist/cjs/docker/options/container/ContainerLogsOptions.d.ts +48 -0
  97. package/dist/cjs/docker/options/container/ContainerLogsOptions.js +56 -0
  98. package/dist/cjs/docker/options/container/ContainerRemoveOptions.d.ts +22 -0
  99. package/dist/cjs/docker/options/container/ContainerRemoveOptions.js +34 -0
  100. package/dist/cjs/docker/options/container/ContainerSettingOptions.d.ts +137 -0
  101. package/dist/cjs/docker/options/container/ContainerSettingOptions.js +136 -0
  102. package/dist/cjs/docker/options/container/ContainerStopOptions.d.ts +28 -0
  103. package/dist/cjs/docker/options/container/ContainerStopOptions.js +40 -0
  104. package/dist/cjs/docker/options/container/ContainerTTYConsoleSizeOptions.d.ts +26 -0
  105. package/dist/cjs/docker/options/container/ContainerTTYConsoleSizeOptions.js +40 -0
  106. package/dist/cjs/docker/options/image/ImageBuildOptions.d.ts +117 -0
  107. package/dist/cjs/docker/options/image/ImageBuildOptions.js +111 -0
  108. package/dist/cjs/docker/options/image/ImageExportOptions.d.ts +33 -0
  109. package/dist/cjs/docker/options/image/ImageExportOptions.js +44 -0
  110. package/dist/cjs/docker/options/image/ImageImportOptions.d.ts +28 -0
  111. package/dist/cjs/docker/options/image/ImageImportOptions.js +42 -0
  112. package/dist/cjs/docker/options/image/ImagePullOptions.d.ts +49 -0
  113. package/dist/cjs/docker/options/image/ImagePullOptions.js +63 -0
  114. package/dist/cjs/docker/options/image/ImagePushOptions.d.ts +41 -0
  115. package/dist/cjs/docker/options/image/ImagePushOptions.js +56 -0
  116. package/dist/cjs/docker/options/image/ImageRemoveOptions.d.ts +26 -0
  117. package/dist/cjs/docker/options/image/ImageRemoveOptions.js +38 -0
  118. package/dist/cjs/docker/options/image/ImageTagOptions.d.ts +25 -0
  119. package/dist/cjs/docker/options/image/ImageTagOptions.js +38 -0
  120. package/dist/cjs/docker/options/network/NetworkCreateOptions.d.ts +54 -0
  121. package/dist/cjs/docker/options/network/NetworkCreateOptions.js +63 -0
  122. package/dist/cjs/docker/types/ContainerBind.d.ts +19 -0
  123. package/dist/cjs/docker/types/ContainerBind.js +2 -0
  124. package/dist/cjs/docker/types/ContainerCapability.d.ts +286 -0
  125. package/dist/cjs/docker/types/ContainerCapability.js +290 -0
  126. package/dist/cjs/docker/types/ContainerConfig.d.ts +67 -0
  127. package/dist/cjs/docker/types/ContainerConfig.js +2 -0
  128. package/dist/cjs/docker/types/ContainerDevice.d.ts +19 -0
  129. package/dist/cjs/docker/types/ContainerDevice.js +2 -0
  130. package/dist/cjs/docker/types/ContainerExecResult.d.ts +20 -0
  131. package/dist/cjs/docker/types/ContainerExecResult.js +2 -0
  132. package/dist/cjs/docker/types/ContainerNetwork.d.ts +46 -0
  133. package/dist/cjs/docker/types/ContainerNetwork.js +2 -0
  134. package/dist/cjs/docker/types/ContainerPort.d.ts +25 -0
  135. package/dist/cjs/docker/types/ContainerPort.js +2 -0
  136. package/dist/cjs/docker/types/ContainerRestartPolicy.d.ts +11 -0
  137. package/dist/cjs/docker/types/ContainerRestartPolicy.js +2 -0
  138. package/dist/cjs/docker/types/ContainerState.d.ts +48 -0
  139. package/dist/cjs/docker/types/ContainerState.js +2 -0
  140. package/dist/cjs/docker/types/ContainerStats.d.ts +408 -0
  141. package/dist/cjs/docker/types/ContainerStats.js +2 -0
  142. package/dist/cjs/docker/types/DockerOutputCallback.d.ts +8 -0
  143. package/dist/cjs/docker/types/DockerOutputCallback.js +2 -0
  144. package/dist/cjs/docker/types/ImageConfig.d.ts +34 -0
  145. package/dist/cjs/docker/types/ImageConfig.js +2 -0
  146. package/dist/cjs/docker/types/ImageExposePort.d.ts +17 -0
  147. package/dist/cjs/docker/types/ImageExposePort.js +2 -0
  148. package/dist/cjs/docker/types/NetworkInfo.d.ts +59 -0
  149. package/dist/cjs/docker/types/NetworkInfo.js +2 -0
  150. package/dist/cjs/docker/types/RepositoryTag.d.ts +15 -0
  151. package/dist/cjs/docker/types/RepositoryTag.js +2 -0
  152. package/dist/cjs/exports/Docker.d.ts +73 -0
  153. package/dist/cjs/exports/Docker.js +92 -0
  154. package/dist/cjs/package.json +1 -0
  155. package/dist/esm/client/BuildContext.js +70 -0
  156. package/dist/esm/client/BuildKitProgress.js +190 -0
  157. package/dist/esm/client/DockerClient.js +307 -0
  158. package/dist/esm/client/DockerConnection.js +355 -0
  159. package/dist/esm/client/DockerIgnore.js +179 -0
  160. package/dist/esm/client/DockerRequestError.js +20 -0
  161. package/dist/esm/client/DockerStreams.js +111 -0
  162. package/dist/esm/client/types/ContainerCreateResponse.js +1 -0
  163. package/dist/esm/client/types/ContainerStopQuery.js +1 -0
  164. package/dist/esm/client/types/DeviceMapping.js +1 -0
  165. package/dist/esm/client/types/IdResponse.js +1 -0
  166. package/dist/esm/client/types/NetworkCreateResponse.js +1 -0
  167. package/dist/esm/client/types/PortBinding.js +1 -0
  168. package/dist/esm/docker/ConnectionOptionsBuilder.js +142 -0
  169. package/dist/esm/docker/Docker.js +697 -0
  170. package/dist/esm/docker/exceptions/DockerConnectionException.js +12 -0
  171. package/dist/esm/docker/exceptions/DockerContainerNotFoundException.js +12 -0
  172. package/dist/esm/docker/exceptions/DockerImageBuildException.js +12 -0
  173. package/dist/esm/docker/exceptions/DockerImageImportException.js +12 -0
  174. package/dist/esm/docker/exceptions/DockerImageNotFoundException.js +13 -0
  175. package/dist/esm/docker/exceptions/DockerImagePullException.js +12 -0
  176. package/dist/esm/docker/exceptions/DockerImagePushException.js +11 -0
  177. package/dist/esm/docker/exceptions/DockerImageRepoTagNotFoundException.js +11 -0
  178. package/dist/esm/docker/exceptions/DockerNetworkNotFoundException.js +12 -0
  179. package/dist/esm/docker/exceptions/DockerRequestException.js +20 -0
  180. package/dist/esm/docker/interfaces/IDockerConnectionOptions.js +1 -0
  181. package/dist/esm/docker/interfaces/IDockerHttpConnectionOptions.js +1 -0
  182. package/dist/esm/docker/interfaces/IDockerHttpsConnectionOptions.js +1 -0
  183. package/dist/esm/docker/interfaces/IDockerKeyObject.js +1 -0
  184. package/dist/esm/docker/interfaces/IDockerSSHConnectionOptions.js +1 -0
  185. package/dist/esm/docker/interfaces/IDockerSocketConnectionOptions.js +1 -0
  186. package/dist/esm/docker/lib/DockerContainer.js +739 -0
  187. package/dist/esm/docker/lib/DockerContainerTTY.js +154 -0
  188. package/dist/esm/docker/lib/DockerImage.js +270 -0
  189. package/dist/esm/docker/lib/EngineSettings.js +78 -0
  190. package/dist/esm/docker/lib/ParseBaseImages.js +47 -0
  191. package/dist/esm/docker/lib/ParseEnvToRecord.js +22 -0
  192. package/dist/esm/docker/lib/ParseRepositoryTag.js +45 -0
  193. package/dist/esm/docker/lib/RegistryAuth.js +12 -0
  194. package/dist/esm/docker/options/DockerPruneOptions.js +43 -0
  195. package/dist/esm/docker/options/auth/DockerAuthOptions.js +55 -0
  196. package/dist/esm/docker/options/container/ContainerCommitOptions.js +35 -0
  197. package/dist/esm/docker/options/container/ContainerCreateTTYOptions.js +39 -0
  198. package/dist/esm/docker/options/container/ContainerExecOptions.js +34 -0
  199. package/dist/esm/docker/options/container/ContainerExportDirectoryOptions.js +35 -0
  200. package/dist/esm/docker/options/container/ContainerKillOptions.js +32 -0
  201. package/dist/esm/docker/options/container/ContainerLogsOptions.js +52 -0
  202. package/dist/esm/docker/options/container/ContainerRemoveOptions.js +30 -0
  203. package/dist/esm/docker/options/container/ContainerSettingOptions.js +132 -0
  204. package/dist/esm/docker/options/container/ContainerStopOptions.js +36 -0
  205. package/dist/esm/docker/options/container/ContainerTTYConsoleSizeOptions.js +36 -0
  206. package/dist/esm/docker/options/image/ImageBuildOptions.js +107 -0
  207. package/dist/esm/docker/options/image/ImageExportOptions.js +40 -0
  208. package/dist/esm/docker/options/image/ImageImportOptions.js +38 -0
  209. package/dist/esm/docker/options/image/ImagePullOptions.js +59 -0
  210. package/dist/esm/docker/options/image/ImagePushOptions.js +52 -0
  211. package/dist/esm/docker/options/image/ImageRemoveOptions.js +34 -0
  212. package/dist/esm/docker/options/image/ImageTagOptions.js +34 -0
  213. package/dist/esm/docker/options/network/NetworkCreateOptions.js +59 -0
  214. package/dist/esm/docker/types/ContainerBind.js +1 -0
  215. package/dist/esm/docker/types/ContainerCapability.js +287 -0
  216. package/dist/esm/docker/types/ContainerConfig.js +1 -0
  217. package/dist/esm/docker/types/ContainerDevice.js +1 -0
  218. package/dist/esm/docker/types/ContainerExecResult.js +1 -0
  219. package/dist/esm/docker/types/ContainerNetwork.js +1 -0
  220. package/dist/esm/docker/types/ContainerPort.js +1 -0
  221. package/dist/esm/docker/types/ContainerRestartPolicy.js +1 -0
  222. package/dist/esm/docker/types/ContainerState.js +1 -0
  223. package/dist/esm/docker/types/ContainerStats.js +1 -0
  224. package/dist/esm/docker/types/DockerOutputCallback.js +1 -0
  225. package/dist/esm/docker/types/ImageConfig.js +1 -0
  226. package/dist/esm/docker/types/ImageExposePort.js +1 -0
  227. package/dist/esm/docker/types/NetworkInfo.js +1 -0
  228. package/dist/esm/docker/types/RepositoryTag.js +1 -0
  229. package/dist/esm/exports/Docker.js +73 -0
  230. package/dist/types/client/BuildContext.d.ts +22 -0
  231. package/dist/types/client/BuildKitProgress.d.ts +81 -0
  232. package/dist/types/client/DockerClient.d.ts +196 -0
  233. package/dist/types/client/DockerConnection.d.ts +154 -0
  234. package/dist/types/client/DockerIgnore.d.ts +44 -0
  235. package/dist/types/client/DockerRequestError.d.ts +17 -0
  236. package/dist/types/client/DockerStreams.d.ts +35 -0
  237. package/dist/types/client/types/ContainerCreateResponse.d.ts +7 -0
  238. package/dist/types/client/types/ContainerStopQuery.d.ts +13 -0
  239. package/dist/types/client/types/DeviceMapping.d.ts +8 -0
  240. package/dist/types/client/types/IdResponse.d.ts +6 -0
  241. package/dist/types/client/types/NetworkCreateResponse.d.ts +7 -0
  242. package/dist/types/client/types/PortBinding.d.ts +10 -0
  243. package/dist/types/docker/ConnectionOptionsBuilder.d.ts +128 -0
  244. package/dist/types/docker/Docker.d.ts +301 -0
  245. package/dist/types/docker/exceptions/DockerConnectionException.d.ts +9 -0
  246. package/dist/types/docker/exceptions/DockerContainerNotFoundException.d.ts +9 -0
  247. package/dist/types/docker/exceptions/DockerImageBuildException.d.ts +9 -0
  248. package/dist/types/docker/exceptions/DockerImageImportException.d.ts +9 -0
  249. package/dist/types/docker/exceptions/DockerImageNotFoundException.d.ts +10 -0
  250. package/dist/types/docker/exceptions/DockerImagePullException.d.ts +9 -0
  251. package/dist/types/docker/exceptions/DockerImagePushException.d.ts +8 -0
  252. package/dist/types/docker/exceptions/DockerImageRepoTagNotFoundException.d.ts +8 -0
  253. package/dist/types/docker/exceptions/DockerNetworkNotFoundException.d.ts +9 -0
  254. package/dist/types/docker/exceptions/DockerRequestException.d.ts +22 -0
  255. package/dist/types/docker/interfaces/IDockerConnectionOptions.d.ts +75 -0
  256. package/dist/types/docker/interfaces/IDockerHttpConnectionOptions.d.ts +16 -0
  257. package/dist/types/docker/interfaces/IDockerHttpsConnectionOptions.d.ts +16 -0
  258. package/dist/types/docker/interfaces/IDockerKeyObject.d.ts +14 -0
  259. package/dist/types/docker/interfaces/IDockerSSHConnectionOptions.d.ts +16 -0
  260. package/dist/types/docker/interfaces/IDockerSocketConnectionOptions.d.ts +7 -0
  261. package/dist/types/docker/lib/DockerContainer.d.ts +315 -0
  262. package/dist/types/docker/lib/DockerContainerTTY.d.ts +99 -0
  263. package/dist/types/docker/lib/DockerImage.d.ts +153 -0
  264. package/dist/types/docker/lib/EngineSettings.d.ts +41 -0
  265. package/dist/types/docker/lib/ParseBaseImages.d.ts +9 -0
  266. package/dist/types/docker/lib/ParseEnvToRecord.d.ts +14 -0
  267. package/dist/types/docker/lib/ParseRepositoryTag.d.ts +17 -0
  268. package/dist/types/docker/lib/RegistryAuth.d.ts +8 -0
  269. package/dist/types/docker/options/DockerPruneOptions.d.ts +38 -0
  270. package/dist/types/docker/options/auth/DockerAuthOptions.d.ts +46 -0
  271. package/dist/types/docker/options/container/ContainerCommitOptions.d.ts +28 -0
  272. package/dist/types/docker/options/container/ContainerCreateTTYOptions.d.ts +32 -0
  273. package/dist/types/docker/options/container/ContainerExecOptions.d.ts +26 -0
  274. package/dist/types/docker/options/container/ContainerExportDirectoryOptions.d.ts +27 -0
  275. package/dist/types/docker/options/container/ContainerKillOptions.d.ts +25 -0
  276. package/dist/types/docker/options/container/ContainerLogsOptions.d.ts +48 -0
  277. package/dist/types/docker/options/container/ContainerRemoveOptions.d.ts +22 -0
  278. package/dist/types/docker/options/container/ContainerSettingOptions.d.ts +137 -0
  279. package/dist/types/docker/options/container/ContainerStopOptions.d.ts +28 -0
  280. package/dist/types/docker/options/container/ContainerTTYConsoleSizeOptions.d.ts +26 -0
  281. package/dist/types/docker/options/image/ImageBuildOptions.d.ts +117 -0
  282. package/dist/types/docker/options/image/ImageExportOptions.d.ts +33 -0
  283. package/dist/types/docker/options/image/ImageImportOptions.d.ts +28 -0
  284. package/dist/types/docker/options/image/ImagePullOptions.d.ts +49 -0
  285. package/dist/types/docker/options/image/ImagePushOptions.d.ts +41 -0
  286. package/dist/types/docker/options/image/ImageRemoveOptions.d.ts +26 -0
  287. package/dist/types/docker/options/image/ImageTagOptions.d.ts +25 -0
  288. package/dist/types/docker/options/network/NetworkCreateOptions.d.ts +54 -0
  289. package/dist/types/docker/types/ContainerBind.d.ts +19 -0
  290. package/dist/types/docker/types/ContainerCapability.d.ts +286 -0
  291. package/dist/types/docker/types/ContainerConfig.d.ts +67 -0
  292. package/dist/types/docker/types/ContainerDevice.d.ts +19 -0
  293. package/dist/types/docker/types/ContainerExecResult.d.ts +20 -0
  294. package/dist/types/docker/types/ContainerNetwork.d.ts +46 -0
  295. package/dist/types/docker/types/ContainerPort.d.ts +25 -0
  296. package/dist/types/docker/types/ContainerRestartPolicy.d.ts +11 -0
  297. package/dist/types/docker/types/ContainerState.d.ts +48 -0
  298. package/dist/types/docker/types/ContainerStats.d.ts +408 -0
  299. package/dist/types/docker/types/DockerOutputCallback.d.ts +8 -0
  300. package/dist/types/docker/types/ImageConfig.d.ts +34 -0
  301. package/dist/types/docker/types/ImageExposePort.d.ts +17 -0
  302. package/dist/types/docker/types/NetworkInfo.d.ts +59 -0
  303. package/dist/types/docker/types/RepositoryTag.d.ts +15 -0
  304. package/dist/types/exports/Docker.d.ts +73 -0
  305. package/package.json +57 -0
@@ -0,0 +1,35 @@
1
+ import { Transform, type TransformCallback } from 'node:stream';
2
+ /**
3
+ * The stream of a frame of a multiplexed output
4
+ */
5
+ export declare enum DockerStreamType {
6
+ STDIN = 0,
7
+ STDOUT = 1,
8
+ STDERR = 2
9
+ }
10
+ /**
11
+ * The output of a container without TTY is multiplexed: each frame is a header of 8 bytes (the stream, 3 zeros, the
12
+ * size as a big endian uint32) and its content. The decoder gives the contents, in their order; its "frame" event
13
+ * gives each content with its stream
14
+ */
15
+ export declare class DockerStreamDecoder extends Transform {
16
+ #private;
17
+ _transform(chunk: Buffer, _encoding: BufferEncoding, callback: TransformCallback): void;
18
+ _flush(callback: TransformCallback): void;
19
+ }
20
+ /**
21
+ * The output of a multiplexed stream (or buffer), and its outputs by stream
22
+ * @param input
23
+ */
24
+ export declare function readMultiplexed(input: NodeJS.ReadableStream | Buffer): Promise<{
25
+ output: string;
26
+ stdout: string;
27
+ stderr: string;
28
+ }>;
29
+ /**
30
+ * Read the JSON lines of a progress (a pull, a push, a build, a load): each object is given to the callback, all of them
31
+ * are given back once the stream ends. The lines which are not JSON are skipped
32
+ * @param input
33
+ * @param onProgress
34
+ */
35
+ export declare function followProgress<T = Record<string, any>>(input: NodeJS.ReadableStream, onProgress?: (progress: T) => void): Promise<T[]>;
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DockerStreamDecoder = exports.DockerStreamType = void 0;
4
+ exports.readMultiplexed = readMultiplexed;
5
+ exports.followProgress = followProgress;
6
+ /*
7
+ * The streams of the Docker Engine API, rewritten from docker-modem (Copyright Pedro Dias, Apache License 2.0, see
8
+ * THIRD_PARTY_NOTICES.md): the multiplexed output of the containers without TTY, and the JSON lines of the progresses
9
+ */
10
+ const node_stream_1 = require("node:stream");
11
+ /**
12
+ * The stream of a frame of a multiplexed output
13
+ */
14
+ var DockerStreamType;
15
+ (function (DockerStreamType) {
16
+ DockerStreamType[DockerStreamType["STDIN"] = 0] = "STDIN";
17
+ DockerStreamType[DockerStreamType["STDOUT"] = 1] = "STDOUT";
18
+ DockerStreamType[DockerStreamType["STDERR"] = 2] = "STDERR";
19
+ })(DockerStreamType || (exports.DockerStreamType = DockerStreamType = {}));
20
+ /**
21
+ * The output of a container without TTY is multiplexed: each frame is a header of 8 bytes (the stream, 3 zeros, the
22
+ * size as a big endian uint32) and its content. The decoder gives the contents, in their order; its "frame" event
23
+ * gives each content with its stream
24
+ */
25
+ class DockerStreamDecoder extends node_stream_1.Transform {
26
+ #pending = Buffer.alloc(0);
27
+ _transform(chunk, _encoding, callback) {
28
+ this.#pending = this.#pending.length ? Buffer.concat([this.#pending, chunk]) : chunk;
29
+ while (this.#pending.length >= 8) {
30
+ const size = this.#pending.readUInt32BE(4);
31
+ if (this.#pending.length < 8 + size)
32
+ break;
33
+ const type = this.#pending.readUInt8(0);
34
+ const content = this.#pending.subarray(8, 8 + size);
35
+ this.#pending = this.#pending.subarray(8 + size);
36
+ if (content.length) {
37
+ this.emit('frame', type, content);
38
+ this.push(content);
39
+ }
40
+ }
41
+ callback();
42
+ }
43
+ _flush(callback) {
44
+ //A truncated frame is given as it is
45
+ if (this.#pending.length)
46
+ this.push(this.#pending);
47
+ callback();
48
+ }
49
+ }
50
+ exports.DockerStreamDecoder = DockerStreamDecoder;
51
+ /**
52
+ * The output of a multiplexed stream (or buffer), and its outputs by stream
53
+ * @param input
54
+ */
55
+ async function readMultiplexed(input) {
56
+ const decoder = new DockerStreamDecoder();
57
+ const output = [];
58
+ const streams = { [DockerStreamType.STDOUT]: [], [DockerStreamType.STDERR]: [] };
59
+ decoder.on('frame', (type, content) => (streams[type] ??= []).push(content));
60
+ decoder.on('data', (content) => output.push(content));
61
+ await new Promise((resolve, reject) => {
62
+ decoder.once('end', resolve).once('error', reject);
63
+ if (Buffer.isBuffer(input)) {
64
+ decoder.end(input);
65
+ }
66
+ else {
67
+ input.once('error', (error) => decoder.destroy(error));
68
+ input.pipe(decoder);
69
+ }
70
+ });
71
+ return {
72
+ output: Buffer.concat(output).toString(),
73
+ stdout: Buffer.concat(streams[DockerStreamType.STDOUT]).toString(),
74
+ stderr: Buffer.concat(streams[DockerStreamType.STDERR]).toString()
75
+ };
76
+ }
77
+ /**
78
+ * Read the JSON lines of a progress (a pull, a push, a build, a load): each object is given to the callback, all of them
79
+ * are given back once the stream ends. The lines which are not JSON are skipped
80
+ * @param input
81
+ * @param onProgress
82
+ */
83
+ async function followProgress(input, onProgress) {
84
+ const objects = [];
85
+ let pending = '';
86
+ const line = (text) => {
87
+ const trimmed = text.trim();
88
+ if (!trimmed)
89
+ return;
90
+ let object;
91
+ try {
92
+ object = JSON.parse(trimmed);
93
+ }
94
+ catch {
95
+ return;
96
+ }
97
+ objects.push(object);
98
+ onProgress?.(object);
99
+ };
100
+ await new Promise((resolve, reject) => {
101
+ input.on('data', (chunk) => {
102
+ pending += chunk.toString();
103
+ let position;
104
+ while ((position = pending.indexOf('\n')) >= 0) {
105
+ line(pending.slice(0, position));
106
+ pending = pending.slice(position + 1);
107
+ }
108
+ });
109
+ input.once('end', () => {
110
+ line(pending);
111
+ resolve();
112
+ });
113
+ input.once('close', resolve);
114
+ input.once('error', reject);
115
+ });
116
+ return objects;
117
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The response of the Docker Engine API to the creation of a container (ContainerCreateResponse)
3
+ */
4
+ export type ContainerCreateResponse = {
5
+ Id: string;
6
+ Warnings?: string[];
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The query of stopping or restarting a container in the Docker Engine API
3
+ */
4
+ export type ContainerStopQuery = {
5
+ /**
6
+ * The number of seconds to wait before killing the container
7
+ */
8
+ t?: number;
9
+ /**
10
+ * The signal to send to the container
11
+ */
12
+ signal?: string;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A device of the host mapped into a container in the Docker Engine API (DeviceMapping)
3
+ */
4
+ export type DeviceMapping = {
5
+ PathOnHost: string;
6
+ PathInContainer: string;
7
+ CgroupPermissions: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The response of the Docker Engine API giving the id of an object it created (IdResponse)
3
+ */
4
+ export type IdResponse = {
5
+ Id: string;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The response of the Docker Engine API to the creation of a network (NetworkCreateResponse)
3
+ */
4
+ export type NetworkCreateResponse = {
5
+ Id: string;
6
+ Warning?: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A binding of a port of a container to a port of the host in the Docker Engine API (PortBinding)
3
+ */
4
+ export type PortBinding = {
5
+ /**
6
+ * The host address the port is bound on, all of them when empty
7
+ */
8
+ HostIp?: string;
9
+ HostPort: string;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,128 @@
1
+ import { IDockerConnectionOptions } from './interfaces/IDockerConnectionOptions.js';
2
+ import { IDockerHttpConnectionOptions } from './interfaces/IDockerHttpConnectionOptions.js';
3
+ import { IDockerHttpsConnectionOptions } from './interfaces/IDockerHttpsConnectionOptions.js';
4
+ import { IDockerSSHConnectionOptions } from './interfaces/IDockerSSHConnectionOptions.js';
5
+ import { ComponentOptionsBuilder } from '@lakutata/core';
6
+ /**
7
+ * Build the component options of a {@link Docker} connected as the options say, to register it in the `components` of
8
+ * an application under the name of your choice. Without `socketPath` nor `host`, it connects to the Docker of the
9
+ * environment (`DOCKER_HOST`, else the local socket). The options are validated when the component is created, not
10
+ * here.
11
+ * @param options The connection options: a socket (`socketPath`), or a `host` and `port` reached with `protocol`
12
+ * (`'http'`, `'https'` or `'ssh'`), with their TLS, SSH, timeout and API version options.
13
+ * @returns The component options (`{class: Docker, ...options}`).
14
+ * @example
15
+ * ```typescript
16
+ * import {Application} from 'lakutata'
17
+ * import {buildDockerConnectionOptions} from 'lakutata/com/docker'
18
+ *
19
+ * Application.run(() => ({
20
+ * id: 'docker.app',
21
+ * name: 'Docker',
22
+ * components: {
23
+ * //The Docker of the environment (DOCKER_HOST, else the local socket), with the API version 1.47
24
+ * docker: buildDockerConnectionOptions({version: '1.47'})
25
+ * }
26
+ * }))
27
+ * ```
28
+ */
29
+ export declare const buildDockerConnectionOptions: ComponentOptionsBuilder<IDockerConnectionOptions>;
30
+ /**
31
+ * Build the component options of a {@link Docker} connected to the Unix socket of a daemon (or its named pipe on
32
+ * Windows), to register it in the `components` of an application. The options are validated when the component is
33
+ * created, not here.
34
+ * @param options The path of the socket (`socketPath`), with the timeout and the API version. Without `socketPath`, the
35
+ * Docker of the environment is used, with the other options applied over it.
36
+ * @returns The component options (`{class: Docker, ...options}`).
37
+ * @example
38
+ * ```typescript
39
+ * import {Application} from 'lakutata'
40
+ * import {buildDockerSocketConnectionOptions} from 'lakutata/com/docker'
41
+ *
42
+ * Application.run(() => ({
43
+ * id: 'docker.app',
44
+ * name: 'Docker',
45
+ * components: {
46
+ * docker: buildDockerSocketConnectionOptions({socketPath: '/var/run/docker.sock', timeout: 60000})
47
+ * }
48
+ * }))
49
+ * ```
50
+ */
51
+ export declare const buildDockerSocketConnectionOptions: ComponentOptionsBuilder<IDockerConnectionOptions>;
52
+ /**
53
+ * Build the component options of a {@link Docker} connected to a daemon over plain HTTP (`dockerd -H tcp://0.0.0.0:2375`),
54
+ * to register it in the `components` of an application. The connection is neither encrypted nor authenticated: keep it
55
+ * to trusted networks. The options are validated when the component is created, not here.
56
+ * @param options The `host` and `port` of the daemon, with the headers, the timeout and the API version; the `protocol`
57
+ * is set to `'http'`.
58
+ * @returns The component options (`{class: Docker, protocol: 'http', ...options}`).
59
+ * @example
60
+ * ```typescript
61
+ * import {Application} from 'lakutata'
62
+ * import {buildDockerHttpConnectionOptions} from 'lakutata/com/docker'
63
+ *
64
+ * Application.run(() => ({
65
+ * id: 'docker.app',
66
+ * name: 'Docker',
67
+ * components: {
68
+ * docker: buildDockerHttpConnectionOptions({host: '192.168.1.10', port: 2375})
69
+ * }
70
+ * }))
71
+ * ```
72
+ */
73
+ export declare const buildDockerHttpConnectionOptions: ComponentOptionsBuilder<IDockerHttpConnectionOptions>;
74
+ /**
75
+ * Build the component options of a {@link Docker} connected to a daemon over HTTPS (`dockerd --tlsverify -H
76
+ * tcp://0.0.0.0:2376`), to register it in the `components` of an application. The options are validated when the
77
+ * component is created, not here.
78
+ * @param options The `host` and `port` of the daemon, with the PEM contents of the authority (`ca`), the client
79
+ * certificate (`cert`) and its key (`key`), the headers, the timeout and the API version; the `protocol` is set to
80
+ * `'https'`.
81
+ * @returns The component options (`{class: Docker, protocol: 'https', ...options}`).
82
+ * @example
83
+ * ```typescript
84
+ * import {readFileSync} from 'node:fs'
85
+ * import {Application} from 'lakutata'
86
+ * import {buildDockerHttpsConnectionOptions} from 'lakutata/com/docker'
87
+ *
88
+ * Application.run(() => ({
89
+ * id: 'docker.app',
90
+ * name: 'Docker',
91
+ * components: {
92
+ * //The PEM contents, not the file paths
93
+ * docker: buildDockerHttpsConnectionOptions({
94
+ * host: 'docker.example.com',
95
+ * port: 2376,
96
+ * ca: readFileSync('/etc/docker/certs/ca.pem'),
97
+ * cert: readFileSync('/etc/docker/certs/cert.pem'),
98
+ * key: readFileSync('/etc/docker/certs/key.pem')
99
+ * })
100
+ * }
101
+ * }))
102
+ * ```
103
+ */
104
+ export declare const buildDockerHttpsConnectionOptions: ComponentOptionsBuilder<IDockerHttpsConnectionOptions>;
105
+ /**
106
+ * Build the component options of a {@link Docker} connected to a remote daemon over SSH, as `DOCKER_HOST=ssh://user@host`
107
+ * does, to register it in the `components` of an application. The requests go through `docker system dial-stdio` run on
108
+ * the remote host, which needs the Docker CLI; locally, the optional package `ssh2` must be installed. The SSH connection
109
+ * authenticates through the SSH agent (no password). The options are validated when the component is created, not here.
110
+ * @param options The `host` and `port` (the SSH port, usually 22) of the remote host, the `username`, the SSH agent's
111
+ * socket (`sshAuthAgent`; `SSH_AUTH_SOCK` by default), the timeout and the API version; the `protocol` is set to
112
+ * `'ssh'`.
113
+ * @returns The component options (`{class: Docker, protocol: 'ssh', ...options}`).
114
+ * @example
115
+ * ```typescript
116
+ * import {Application} from 'lakutata'
117
+ * import {buildDockerSSHConnectionOptions} from 'lakutata/com/docker'
118
+ *
119
+ * Application.run(() => ({
120
+ * id: 'docker.app',
121
+ * name: 'Docker',
122
+ * components: {
123
+ * docker: buildDockerSSHConnectionOptions({host: 'docker.example.com', port: 22, username: 'deploy'})
124
+ * }
125
+ * }))
126
+ * ```
127
+ */
128
+ export declare const buildDockerSSHConnectionOptions: ComponentOptionsBuilder<IDockerSSHConnectionOptions>;
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildDockerSSHConnectionOptions = exports.buildDockerHttpsConnectionOptions = exports.buildDockerHttpConnectionOptions = exports.buildDockerSocketConnectionOptions = exports.buildDockerConnectionOptions = void 0;
4
+ const Docker_js_1 = require("./Docker.js");
5
+ /**
6
+ * Build the component options of a {@link Docker} connected as the options say, to register it in the `components` of
7
+ * an application under the name of your choice. Without `socketPath` nor `host`, it connects to the Docker of the
8
+ * environment (`DOCKER_HOST`, else the local socket). The options are validated when the component is created, not
9
+ * here.
10
+ * @param options The connection options: a socket (`socketPath`), or a `host` and `port` reached with `protocol`
11
+ * (`'http'`, `'https'` or `'ssh'`), with their TLS, SSH, timeout and API version options.
12
+ * @returns The component options (`{class: Docker, ...options}`).
13
+ * @example
14
+ * ```typescript
15
+ * import {Application} from 'lakutata'
16
+ * import {buildDockerConnectionOptions} from 'lakutata/com/docker'
17
+ *
18
+ * Application.run(() => ({
19
+ * id: 'docker.app',
20
+ * name: 'Docker',
21
+ * components: {
22
+ * //The Docker of the environment (DOCKER_HOST, else the local socket), with the API version 1.47
23
+ * docker: buildDockerConnectionOptions({version: '1.47'})
24
+ * }
25
+ * }))
26
+ * ```
27
+ */
28
+ const buildDockerConnectionOptions = (options) => ({
29
+ ...options,
30
+ class: Docker_js_1.Docker
31
+ });
32
+ exports.buildDockerConnectionOptions = buildDockerConnectionOptions;
33
+ /**
34
+ * Build the component options of a {@link Docker} connected to the Unix socket of a daemon (or its named pipe on
35
+ * Windows), to register it in the `components` of an application. The options are validated when the component is
36
+ * created, not here.
37
+ * @param options The path of the socket (`socketPath`), with the timeout and the API version. Without `socketPath`, the
38
+ * Docker of the environment is used, with the other options applied over it.
39
+ * @returns The component options (`{class: Docker, ...options}`).
40
+ * @example
41
+ * ```typescript
42
+ * import {Application} from 'lakutata'
43
+ * import {buildDockerSocketConnectionOptions} from 'lakutata/com/docker'
44
+ *
45
+ * Application.run(() => ({
46
+ * id: 'docker.app',
47
+ * name: 'Docker',
48
+ * components: {
49
+ * docker: buildDockerSocketConnectionOptions({socketPath: '/var/run/docker.sock', timeout: 60000})
50
+ * }
51
+ * }))
52
+ * ```
53
+ */
54
+ const buildDockerSocketConnectionOptions = (options) => ({
55
+ ...options,
56
+ class: Docker_js_1.Docker
57
+ });
58
+ exports.buildDockerSocketConnectionOptions = buildDockerSocketConnectionOptions;
59
+ /**
60
+ * Build the component options of a {@link Docker} connected to a daemon over plain HTTP (`dockerd -H tcp://0.0.0.0:2375`),
61
+ * to register it in the `components` of an application. The connection is neither encrypted nor authenticated: keep it
62
+ * to trusted networks. The options are validated when the component is created, not here.
63
+ * @param options The `host` and `port` of the daemon, with the headers, the timeout and the API version; the `protocol`
64
+ * is set to `'http'`.
65
+ * @returns The component options (`{class: Docker, protocol: 'http', ...options}`).
66
+ * @example
67
+ * ```typescript
68
+ * import {Application} from 'lakutata'
69
+ * import {buildDockerHttpConnectionOptions} from 'lakutata/com/docker'
70
+ *
71
+ * Application.run(() => ({
72
+ * id: 'docker.app',
73
+ * name: 'Docker',
74
+ * components: {
75
+ * docker: buildDockerHttpConnectionOptions({host: '192.168.1.10', port: 2375})
76
+ * }
77
+ * }))
78
+ * ```
79
+ */
80
+ const buildDockerHttpConnectionOptions = (options) => ({
81
+ ...options,
82
+ protocol: 'http',
83
+ class: Docker_js_1.Docker
84
+ });
85
+ exports.buildDockerHttpConnectionOptions = buildDockerHttpConnectionOptions;
86
+ /**
87
+ * Build the component options of a {@link Docker} connected to a daemon over HTTPS (`dockerd --tlsverify -H
88
+ * tcp://0.0.0.0:2376`), to register it in the `components` of an application. The options are validated when the
89
+ * component is created, not here.
90
+ * @param options The `host` and `port` of the daemon, with the PEM contents of the authority (`ca`), the client
91
+ * certificate (`cert`) and its key (`key`), the headers, the timeout and the API version; the `protocol` is set to
92
+ * `'https'`.
93
+ * @returns The component options (`{class: Docker, protocol: 'https', ...options}`).
94
+ * @example
95
+ * ```typescript
96
+ * import {readFileSync} from 'node:fs'
97
+ * import {Application} from 'lakutata'
98
+ * import {buildDockerHttpsConnectionOptions} from 'lakutata/com/docker'
99
+ *
100
+ * Application.run(() => ({
101
+ * id: 'docker.app',
102
+ * name: 'Docker',
103
+ * components: {
104
+ * //The PEM contents, not the file paths
105
+ * docker: buildDockerHttpsConnectionOptions({
106
+ * host: 'docker.example.com',
107
+ * port: 2376,
108
+ * ca: readFileSync('/etc/docker/certs/ca.pem'),
109
+ * cert: readFileSync('/etc/docker/certs/cert.pem'),
110
+ * key: readFileSync('/etc/docker/certs/key.pem')
111
+ * })
112
+ * }
113
+ * }))
114
+ * ```
115
+ */
116
+ const buildDockerHttpsConnectionOptions = (options) => ({
117
+ ...options,
118
+ protocol: 'https',
119
+ class: Docker_js_1.Docker
120
+ });
121
+ exports.buildDockerHttpsConnectionOptions = buildDockerHttpsConnectionOptions;
122
+ /**
123
+ * Build the component options of a {@link Docker} connected to a remote daemon over SSH, as `DOCKER_HOST=ssh://user@host`
124
+ * does, to register it in the `components` of an application. The requests go through `docker system dial-stdio` run on
125
+ * the remote host, which needs the Docker CLI; locally, the optional package `ssh2` must be installed. The SSH connection
126
+ * authenticates through the SSH agent (no password). The options are validated when the component is created, not here.
127
+ * @param options The `host` and `port` (the SSH port, usually 22) of the remote host, the `username`, the SSH agent's
128
+ * socket (`sshAuthAgent`; `SSH_AUTH_SOCK` by default), the timeout and the API version; the `protocol` is set to
129
+ * `'ssh'`.
130
+ * @returns The component options (`{class: Docker, protocol: 'ssh', ...options}`).
131
+ * @example
132
+ * ```typescript
133
+ * import {Application} from 'lakutata'
134
+ * import {buildDockerSSHConnectionOptions} from 'lakutata/com/docker'
135
+ *
136
+ * Application.run(() => ({
137
+ * id: 'docker.app',
138
+ * name: 'Docker',
139
+ * components: {
140
+ * docker: buildDockerSSHConnectionOptions({host: 'docker.example.com', port: 22, username: 'deploy'})
141
+ * }
142
+ * }))
143
+ * ```
144
+ */
145
+ const buildDockerSSHConnectionOptions = (options) => ({
146
+ ...options,
147
+ protocol: 'ssh',
148
+ class: Docker_js_1.Docker
149
+ });
150
+ exports.buildDockerSSHConnectionOptions = buildDockerSSHConnectionOptions;