@dagger.io/dagger 0.18.2 → 0.18.3

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.
@@ -126,6 +126,12 @@ export type ContainerBuildOpts = {
126
126
  * They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl [http://example.com?token=$(cat /run/secrets/my-secret)](http://example.com?token=$(cat /run/secrets/my-secret))
127
127
  */
128
128
  secrets?: Secret[];
129
+ /**
130
+ * If set, skip the automatic init process injected into containers created by RUN statements.
131
+ *
132
+ * This should only be used if the user requires that their exec processes be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
133
+ */
134
+ noInit?: boolean;
129
135
  };
130
136
  export type ContainerDirectoryOpts = {
131
137
  /**
@@ -185,7 +191,7 @@ export type ContainerPublishOpts = {
185
191
  /**
186
192
  * Use the specified media types for the published image's layers.
187
193
  *
188
- * Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
194
+ * Defaults to "OCI", which is compatible with most recent registries, but "Docker" may be needed for older registries without OCI support.
189
195
  */
190
196
  mediaTypes?: ImageMediaTypes;
191
197
  };
@@ -283,7 +289,7 @@ export type ContainerWithDirectoryOpts = {
283
289
  };
284
290
  export type ContainerWithEntrypointOpts = {
285
291
  /**
286
- * Don't remove the default arguments when setting the entrypoint.
292
+ * Don't reset the default arguments when setting the entrypoint. By default it is reset, since entrypoint and default args are often tightly coupled.
287
293
  */
288
294
  keepDefaultArgs?: boolean;
289
295
  };
@@ -295,19 +301,19 @@ export type ContainerWithEnvVariableOpts = {
295
301
  };
296
302
  export type ContainerWithExecOpts = {
297
303
  /**
298
- * If the container has an entrypoint, prepend it to the args.
304
+ * Apply the OCI entrypoint, if present, by prepending it to the args. Ignored by default.
299
305
  */
300
306
  useEntrypoint?: boolean;
301
307
  /**
302
- * Content to write to the command's standard input before closing (e.g., "Hello world").
308
+ * Content to write to the command's standard input. Example: "Hello world")
303
309
  */
304
310
  stdin?: string;
305
311
  /**
306
- * Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
312
+ * Redirect the command's standard output to a file in the container. Example: "./stdout.txt"
307
313
  */
308
314
  redirectStdout?: string;
309
315
  /**
310
- * Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
316
+ * Like redirectStdout, but for standard error
311
317
  */
312
318
  redirectStderr?: string;
313
319
  /**
@@ -316,12 +322,12 @@ export type ContainerWithExecOpts = {
316
322
  expect?: ReturnType;
317
323
  /**
318
324
  * Provides Dagger access to the executed command.
319
- *
320
- * Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
321
325
  */
322
326
  experimentalPrivilegedNesting?: boolean;
323
327
  /**
324
- * Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
328
+ * Execute the command with all root capabilities. Like --privileged in Docker
329
+ *
330
+ * DANGER: this grants the command full access to the host system. Only use when 1) you trust the command being executed and 2) you specifically need this level of access.
325
331
  */
326
332
  insecureRootCapabilities?: boolean;
327
333
  /**
@@ -329,19 +335,19 @@ export type ContainerWithExecOpts = {
329
335
  */
330
336
  expand?: boolean;
331
337
  /**
332
- * If set, skip the automatic init process injected into containers by default.
338
+ * Skip the automatic init process injected into containers by default.
333
339
  *
334
- * This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
340
+ * Only use this if you specifically need the command to be pid 1 in the container. Otherwise it may result in unexpected behavior. If you're not sure, you don't need this.
335
341
  */
336
342
  noInit?: boolean;
337
343
  };
338
344
  export type ContainerWithExposedPortOpts = {
339
345
  /**
340
- * Transport layer network protocol
346
+ * Network protocol. Example: "tcp"
341
347
  */
342
348
  protocol?: NetworkProtocol;
343
349
  /**
344
- * Optional port description
350
+ * Port description. Example: "payment API endpoint"
345
351
  */
346
352
  description?: string;
347
353
  /**
@@ -351,7 +357,7 @@ export type ContainerWithExposedPortOpts = {
351
357
  };
352
358
  export type ContainerWithFileOpts = {
353
359
  /**
354
- * Permission given to the copied file (e.g., 0600).
360
+ * Permissions of the new file. Example: 0600
355
361
  */
356
362
  permissions?: number;
357
363
  /**
@@ -469,7 +475,7 @@ export type ContainerWithMountedTempOpts = {
469
475
  };
470
476
  export type ContainerWithNewFileOpts = {
471
477
  /**
472
- * Permission given to the written file (e.g., 0600).
478
+ * Permissions of the new file. Example: 0600
473
479
  */
474
480
  permissions?: number;
475
481
  /**
@@ -608,6 +614,12 @@ export type DirectoryDockerBuildOpts = {
608
614
  * They will be mounted at /run/secrets/[secret-name].
609
615
  */
610
616
  secrets?: Secret[];
617
+ /**
618
+ * If set, skip the automatic init process injected into containers created by RUN statements.
619
+ *
620
+ * This should only be used if the user requires that their exec processes be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
621
+ */
622
+ noInit?: boolean;
611
623
  };
612
624
  export type DirectoryEntriesOpts = {
613
625
  /**
@@ -623,11 +635,11 @@ export type DirectoryExportOpts = {
623
635
  };
624
636
  export type DirectoryFilterOpts = {
625
637
  /**
626
- * Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
638
+ * If set, paths matching one of these glob patterns is excluded from the new snapshot. Example: ["node_modules/", ".git*", ".env"]
627
639
  */
628
640
  exclude?: string[];
629
641
  /**
630
- * Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
642
+ * If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
631
643
  */
632
644
  include?: string[];
633
645
  };
@@ -681,7 +693,7 @@ export type DirectoryWithNewDirectoryOpts = {
681
693
  };
682
694
  export type DirectoryWithNewFileOpts = {
683
695
  /**
684
- * Permission given to the copied file (e.g., 0600).
696
+ * Permissions of the new file. Example: 0600
685
697
  */
686
698
  permissions?: number;
687
699
  };
@@ -1045,7 +1057,7 @@ export type ClientCacheVolumeOpts = {
1045
1057
  };
1046
1058
  export type ClientContainerOpts = {
1047
1059
  /**
1048
- * Platform to initialize the container with.
1060
+ * Platform to initialize the container with. Defaults to the native platform of the current engine
1049
1061
  */
1050
1062
  platform?: Platform;
1051
1063
  };
@@ -1089,9 +1101,6 @@ export type ClientLlmOpts = {
1089
1101
  */
1090
1102
  maxAPICalls?: number;
1091
1103
  };
1092
- export type ClientLoadSecretFromNameOpts = {
1093
- accessor?: string;
1094
- };
1095
1104
  export type ClientModuleSourceOpts = {
1096
1105
  /**
1097
1106
  * The pinned version of the module source
@@ -1458,7 +1467,7 @@ export declare class Container extends BaseClient {
1458
1467
  */
1459
1468
  asService: (opts?: ContainerAsServiceOpts) => Service;
1460
1469
  /**
1461
- * Returns a File representing the container serialized to a tarball.
1470
+ * Package the container state as an OCI image, and return it as a tar archive
1462
1471
  * @param opts.platformVariants Identifiers for other platform specific containers.
1463
1472
  *
1464
1473
  * Used for multi-platform images.
@@ -1481,14 +1490,17 @@ export declare class Container extends BaseClient {
1481
1490
  * They will be mounted at /run/secrets/[secret-name] in the build container
1482
1491
  *
1483
1492
  * They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl [http://example.com?token=$(cat /run/secrets/my-secret)](http://example.com?token=$(cat /run/secrets/my-secret))
1493
+ * @param opts.noInit If set, skip the automatic init process injected into containers created by RUN statements.
1494
+ *
1495
+ * This should only be used if the user requires that their exec processes be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
1484
1496
  */
1485
1497
  build: (context: Directory, opts?: ContainerBuildOpts) => Container;
1486
1498
  /**
1487
- * Retrieves default arguments for future commands.
1499
+ * Return the container's default arguments.
1488
1500
  */
1489
1501
  defaultArgs: () => Promise<string[]>;
1490
1502
  /**
1491
- * Retrieves a directory at the given path.
1503
+ * Retrieve a directory from the container's root filesystem
1492
1504
  *
1493
1505
  * Mounts are included.
1494
1506
  * @param path The path of the directory to retrieve (e.g., "./src").
@@ -1496,7 +1508,7 @@ export declare class Container extends BaseClient {
1496
1508
  */
1497
1509
  directory: (path: string, opts?: ContainerDirectoryOpts) => Directory;
1498
1510
  /**
1499
- * Retrieves entrypoint to be prepended to the arguments of all commands.
1511
+ * Return the container's OCI entrypoint.
1500
1512
  */
1501
1513
  entrypoint: () => Promise<string[]>;
1502
1514
  /**
@@ -1509,9 +1521,9 @@ export declare class Container extends BaseClient {
1509
1521
  */
1510
1522
  envVariables: () => Promise<EnvVariable[]>;
1511
1523
  /**
1512
- * The exit code of the last executed command.
1524
+ * The exit code of the last executed command
1513
1525
  *
1514
- * Returns an error if no command was set.
1526
+ * Returns an error if no command was executed
1515
1527
  */
1516
1528
  exitCode: () => Promise<number>;
1517
1529
  /**
@@ -1565,10 +1577,8 @@ export declare class Container extends BaseClient {
1565
1577
  */
1566
1578
  file: (path: string, opts?: ContainerFileOpts) => File;
1567
1579
  /**
1568
- * Initializes this container from a pulled base image.
1569
- * @param address Image's address from its registry.
1570
- *
1571
- * Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main").
1580
+ * Download a container image, and apply it to the container state. All previous state will be lost.
1581
+ * @param address Address of the container image to download, in standard OCI ref format. Example:"registry.dagger.io/engine:latest"
1572
1582
  */
1573
1583
  from: (address: string) => Container;
1574
1584
  /**
@@ -1599,14 +1609,12 @@ export declare class Container extends BaseClient {
1599
1609
  */
1600
1610
  platform: () => Promise<Platform>;
1601
1611
  /**
1602
- * Publishes this container as a new image to the specified address.
1612
+ * Package the container state as an OCI image, and publish it to a registry
1603
1613
  *
1604
- * Publish returns a fully qualified ref.
1614
+ * Returns the fully qualified address of the published image, with digest
1615
+ * @param address The OCI address to publish to
1605
1616
  *
1606
- * It can also publish platform variants.
1607
- * @param address Registry's address to publish the image to.
1608
- *
1609
- * Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main").
1617
+ * Same format as "docker push". Example: "registry.example.com/user/repo:tag"
1610
1618
  * @param opts.platformVariants Identifiers for other platform specific containers.
1611
1619
  *
1612
1620
  * Used for multi-platform image.
@@ -1615,23 +1623,23 @@ export declare class Container extends BaseClient {
1615
1623
  * If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
1616
1624
  * @param opts.mediaTypes Use the specified media types for the published image's layers.
1617
1625
  *
1618
- * Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
1626
+ * Defaults to "OCI", which is compatible with most recent registries, but "Docker" may be needed for older registries without OCI support.
1619
1627
  */
1620
1628
  publish: (address: string, opts?: ContainerPublishOpts) => Promise<string>;
1621
1629
  /**
1622
- * Retrieves this container's root filesystem. Mounts are not included.
1630
+ * Return a snapshot of the container's root filesystem. The snapshot can be modified then written back using withRootfs. Use that method for filesystem modifications.
1623
1631
  */
1624
1632
  rootfs: () => Directory;
1625
1633
  /**
1626
- * The error stream of the last executed command.
1634
+ * The buffered standard error stream of the last executed command
1627
1635
  *
1628
- * Returns an error if no command was set.
1636
+ * Returns an error if no command was executed
1629
1637
  */
1630
1638
  stderr: () => Promise<string>;
1631
1639
  /**
1632
- * The output stream of the last executed command.
1640
+ * The buffered standard output stream of the last executed command
1633
1641
  *
1634
- * Returns an error if no command was set.
1642
+ * Returns an error if no command was executed
1635
1643
  */
1636
1644
  stdout: () => Promise<string>;
1637
1645
  /**
@@ -1682,7 +1690,7 @@ export declare class Container extends BaseClient {
1682
1690
  */
1683
1691
  withAnnotation: (name: string, value: string) => Container;
1684
1692
  /**
1685
- * Configures default arguments for future commands.
1693
+ * Configures default arguments for future commands. Like CMD in Dockerfile.
1686
1694
  * @param args Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
1687
1695
  */
1688
1696
  withDefaultArgs: (args: string[]) => Container;
@@ -1696,7 +1704,7 @@ export declare class Container extends BaseClient {
1696
1704
  */
1697
1705
  withDefaultTerminalCmd: (args: string[], opts?: ContainerWithDefaultTerminalCmdOpts) => Container;
1698
1706
  /**
1699
- * Retrieves this container plus a directory written at the given path.
1707
+ * Return a new container snapshot, with a directory added to its filesystem
1700
1708
  * @param path Location of the written directory (e.g., "/tmp/directory").
1701
1709
  * @param directory Identifier of the directory to write
1702
1710
  * @param opts.exclude Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
@@ -1710,57 +1718,59 @@ export declare class Container extends BaseClient {
1710
1718
  */
1711
1719
  withDirectory: (path: string, directory: Directory, opts?: ContainerWithDirectoryOpts) => Container;
1712
1720
  /**
1713
- * Retrieves this container but with a different command entrypoint.
1714
- * @param args Entrypoint to use for future executions (e.g., ["go", "run"]).
1715
- * @param opts.keepDefaultArgs Don't remove the default arguments when setting the entrypoint.
1721
+ * Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
1722
+ * @param args Arguments of the entrypoint. Example: ["go", "run"].
1723
+ * @param opts.keepDefaultArgs Don't reset the default arguments when setting the entrypoint. By default it is reset, since entrypoint and default args are often tightly coupled.
1716
1724
  */
1717
1725
  withEntrypoint: (args: string[], opts?: ContainerWithEntrypointOpts) => Container;
1718
1726
  /**
1719
- * Retrieves this container plus the given environment variable.
1720
- * @param name The name of the environment variable (e.g., "HOST").
1721
- * @param value The value of the environment variable. (e.g., "localhost").
1727
+ * Set a new environment variable in the container.
1728
+ * @param name Name of the environment variable (e.g., "HOST").
1729
+ * @param value Value of the environment variable. (e.g., "localhost").
1722
1730
  * @param opts.expand Replace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH").
1723
1731
  */
1724
1732
  withEnvVariable: (name: string, value: string, opts?: ContainerWithEnvVariableOpts) => Container;
1725
1733
  /**
1726
- * Retrieves this container after executing the specified command inside it.
1727
- * @param args Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
1734
+ * Execute a command in the container, and return a new snapshot of the container state after execution.
1735
+ * @param args Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
1728
1736
  *
1729
- * If empty, the container's default command is used.
1730
- * @param opts.useEntrypoint If the container has an entrypoint, prepend it to the args.
1731
- * @param opts.stdin Content to write to the command's standard input before closing (e.g., "Hello world").
1732
- * @param opts.redirectStdout Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
1733
- * @param opts.redirectStderr Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
1737
+ * To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
1738
+ *
1739
+ * Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
1740
+ * @param opts.useEntrypoint Apply the OCI entrypoint, if present, by prepending it to the args. Ignored by default.
1741
+ * @param opts.stdin Content to write to the command's standard input. Example: "Hello world")
1742
+ * @param opts.redirectStdout Redirect the command's standard output to a file in the container. Example: "./stdout.txt"
1743
+ * @param opts.redirectStderr Like redirectStdout, but for standard error
1734
1744
  * @param opts.expect Exit codes this command is allowed to exit with without error
1735
1745
  * @param opts.experimentalPrivilegedNesting Provides Dagger access to the executed command.
1746
+ * @param opts.insecureRootCapabilities Execute the command with all root capabilities. Like --privileged in Docker
1736
1747
  *
1737
- * Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
1738
- * @param opts.insecureRootCapabilities Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
1748
+ * DANGER: this grants the command full access to the host system. Only use when 1) you trust the command being executed and 2) you specifically need this level of access.
1739
1749
  * @param opts.expand Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1740
- * @param opts.noInit If set, skip the automatic init process injected into containers by default.
1750
+ * @param opts.noInit Skip the automatic init process injected into containers by default.
1741
1751
  *
1742
- * This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
1752
+ * Only use this if you specifically need the command to be pid 1 in the container. Otherwise it may result in unexpected behavior. If you're not sure, you don't need this.
1743
1753
  */
1744
1754
  withExec: (args: string[], opts?: ContainerWithExecOpts) => Container;
1745
1755
  /**
1746
- * Expose a network port.
1756
+ * Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
1747
1757
  *
1748
1758
  * Exposed ports serve two purposes:
1749
1759
  *
1750
1760
  * - For health checks and introspection, when running services
1751
1761
  *
1752
1762
  * - For setting the EXPOSE OCI field when publishing the container
1753
- * @param port Port number to expose
1754
- * @param opts.protocol Transport layer network protocol
1755
- * @param opts.description Optional port description
1763
+ * @param port Port number to expose. Example: 8080
1764
+ * @param opts.protocol Network protocol. Example: "tcp"
1765
+ * @param opts.description Port description. Example: "payment API endpoint"
1756
1766
  * @param opts.experimentalSkipHealthcheck Skip the health check when run as a service.
1757
1767
  */
1758
1768
  withExposedPort: (port: number, opts?: ContainerWithExposedPortOpts) => Container;
1759
1769
  /**
1760
- * Retrieves this container plus the contents of the given file copied to the given path.
1761
- * @param path Location of the copied file (e.g., "/tmp/file.txt").
1762
- * @param source Identifier of the file to copy.
1763
- * @param opts.permissions Permission given to the copied file (e.g., 0600).
1770
+ * Return a container snapshot with a file added
1771
+ * @param path Path of the new file. Example: "/path/to/new-file.txt"
1772
+ * @param source File to add
1773
+ * @param opts.permissions Permissions of the new file. Example: 0600
1764
1774
  * @param opts.owner A user:group to set for the file.
1765
1775
  *
1766
1776
  * The user and group can either be an ID (1000:1000) or a name (foo:bar).
@@ -1851,10 +1861,10 @@ export declare class Container extends BaseClient {
1851
1861
  */
1852
1862
  withMountedTemp: (path: string, opts?: ContainerWithMountedTempOpts) => Container;
1853
1863
  /**
1854
- * Retrieves this container plus a new file written at the given path.
1855
- * @param path Location of the written file (e.g., "/tmp/file.txt").
1856
- * @param contents Content of the file to write (e.g., "Hello world!").
1857
- * @param opts.permissions Permission given to the written file (e.g., 0600).
1864
+ * Return a new container snapshot, with a file added to its filesystem
1865
+ * @param path Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
1866
+ * @param contents Contents of the new file. Example: "Hello world!"
1867
+ * @param opts.permissions Permissions of the new file. Example: 0600
1858
1868
  * @param opts.owner A user:group to set for the file.
1859
1869
  *
1860
1870
  * The user and group can either be an ID (1000:1000) or a name (foo:bar).
@@ -1864,35 +1874,33 @@ export declare class Container extends BaseClient {
1864
1874
  */
1865
1875
  withNewFile: (path: string, contents: string, opts?: ContainerWithNewFileOpts) => Container;
1866
1876
  /**
1867
- * Retrieves this container with a registry authentication for a given address.
1868
- * @param address Registry's address to bind the authentication to.
1869
- *
1870
- * Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
1871
- * @param username The username of the registry's account (e.g., "Dagger").
1872
- * @param secret The API key, password or token to authenticate to this registry.
1877
+ * Attach credentials for future publishing to a registry. Use in combination with publish
1878
+ * @param address The image address that needs authentication. Same format as "docker push". Example: "registry.dagger.io/dagger:latest"
1879
+ * @param username The username to authenticate with. Example: "alice"
1880
+ * @param secret The API key, password or token to authenticate to this registry
1873
1881
  */
1874
1882
  withRegistryAuth: (address: string, username: string, secret: Secret) => Container;
1875
1883
  /**
1876
- * Retrieves the container with the given directory mounted to /.
1877
- * @param directory Directory to mount.
1884
+ * Change the container's root filesystem. The previous root filesystem will be lost.
1885
+ * @param directory The new root filesystem.
1878
1886
  */
1879
1887
  withRootfs: (directory: Directory) => Container;
1880
1888
  /**
1881
- * Retrieves this container plus an env variable containing the given secret.
1882
- * @param name The name of the secret variable (e.g., "API_SECRET").
1883
- * @param secret The identifier of the secret value.
1889
+ * Set a new environment variable, using a secret value
1890
+ * @param name Name of the secret variable (e.g., "API_SECRET").
1891
+ * @param secret Identifier of the secret value.
1884
1892
  */
1885
1893
  withSecretVariable: (name: string, secret: Secret) => Container;
1886
1894
  /**
1887
- * Establish a runtime dependency on a service.
1895
+ * Establish a runtime dependency on a from a container to a network service.
1888
1896
  *
1889
1897
  * The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
1890
1898
  *
1891
1899
  * The service will be reachable from the container via the provided hostname alias.
1892
1900
  *
1893
1901
  * The service dependency will also convey to any files or directories produced by the container.
1894
- * @param alias A name that can be used to reach the service from the container
1895
- * @param service Identifier of the service container
1902
+ * @param alias Hostname that will resolve to the target service (only accessible from within this container)
1903
+ * @param service The target service
1896
1904
  */
1897
1905
  withServiceBinding: (alias: string, service: Service) => Container;
1898
1906
  /**
@@ -1913,7 +1921,7 @@ export declare class Container extends BaseClient {
1913
1921
  */
1914
1922
  withUser: (name: string) => Container;
1915
1923
  /**
1916
- * Retrieves this container with a different working directory.
1924
+ * Change the container's working directory. Like WORKDIR in Dockerfile.
1917
1925
  * @param path The path to set as the working directory (e.g., "/app").
1918
1926
  * @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1919
1927
  */
@@ -1924,17 +1932,17 @@ export declare class Container extends BaseClient {
1924
1932
  */
1925
1933
  withoutAnnotation: (name: string) => Container;
1926
1934
  /**
1927
- * Retrieves this container with unset default arguments for future commands.
1935
+ * Remove the container's default arguments.
1928
1936
  */
1929
1937
  withoutDefaultArgs: () => Container;
1930
1938
  /**
1931
- * Retrieves this container with the directory at the given path removed.
1939
+ * Return a new container snapshot, with a directory removed from its filesystem
1932
1940
  * @param path Location of the directory to remove (e.g., ".github/").
1933
1941
  * @param opts.expand Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1934
1942
  */
1935
1943
  withoutDirectory: (path: string, opts?: ContainerWithoutDirectoryOpts) => Container;
1936
1944
  /**
1937
- * Retrieves this container with an unset command entrypoint.
1945
+ * Reset the container's OCI entrypoint.
1938
1946
  * @param opts.keepDefaultArgs Don't remove the default arguments when unsetting the entrypoint.
1939
1947
  */
1940
1948
  withoutEntrypoint: (opts?: ContainerWithoutEntrypointOpts) => Container;
@@ -1956,8 +1964,8 @@ export declare class Container extends BaseClient {
1956
1964
  */
1957
1965
  withoutFile: (path: string, opts?: ContainerWithoutFileOpts) => Container;
1958
1966
  /**
1959
- * Retrieves this container with the files at the given paths removed.
1960
- * @param paths Location of the files to remove (e.g., ["/file.txt"]).
1967
+ * Return a new container spanshot with specified files removed
1968
+ * @param paths Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
1961
1969
  * @param opts.expand Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1962
1970
  */
1963
1971
  withoutFiles: (paths: string[], opts?: ContainerWithoutFilesOpts) => Container;
@@ -1997,7 +2005,7 @@ export declare class Container extends BaseClient {
1997
2005
  */
1998
2006
  withoutUser: () => Container;
1999
2007
  /**
2000
- * Retrieves this container with an unset working directory.
2008
+ * Unset the container's working directory.
2001
2009
  *
2002
2010
  * Should default to "/".
2003
2011
  */
@@ -2066,7 +2074,7 @@ export declare class Directory extends BaseClient {
2066
2074
  */
2067
2075
  id: () => Promise<DirectoryID>;
2068
2076
  /**
2069
- * Converts this directory into a git repository
2077
+ * Converts this directory to a local git repository
2070
2078
  */
2071
2079
  asGit: () => GitRepository;
2072
2080
  /**
@@ -2084,8 +2092,8 @@ export declare class Directory extends BaseClient {
2084
2092
  */
2085
2093
  asModuleSource: (opts?: DirectoryAsModuleSourceOpts) => ModuleSource;
2086
2094
  /**
2087
- * Gets the difference between this directory and an another directory.
2088
- * @param other Identifier of the directory to compare.
2095
+ * Return the difference between this directory and an another directory. The difference is encoded as a directory.
2096
+ * @param other The directory to compare against
2089
2097
  */
2090
2098
  diff: (other: Directory) => Directory;
2091
2099
  /**
@@ -2094,11 +2102,11 @@ export declare class Directory extends BaseClient {
2094
2102
  digest: () => Promise<string>;
2095
2103
  /**
2096
2104
  * Retrieves a directory at the given path.
2097
- * @param path Location of the directory to retrieve (e.g., "/src").
2105
+ * @param path Location of the directory to retrieve. Example: "/src"
2098
2106
  */
2099
2107
  directory: (path: string) => Directory;
2100
2108
  /**
2101
- * Builds a new Docker container from this directory.
2109
+ * Use Dockerfile compatibility to build a container from this directory. Only use this function for Dockerfile compatibility. Otherwise use the native Container type directly, it is feature-complete and supports all Dockerfile features.
2102
2110
  * @param opts.platform The platform to build.
2103
2111
  * @param opts.dockerfile Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
2104
2112
  * @param opts.target Target build stage to build.
@@ -2106,6 +2114,9 @@ export declare class Directory extends BaseClient {
2106
2114
  * @param opts.secrets Secrets to pass to the build.
2107
2115
  *
2108
2116
  * They will be mounted at /run/secrets/[secret-name].
2117
+ * @param opts.noInit If set, skip the automatic init process injected into containers created by RUN statements.
2118
+ *
2119
+ * This should only be used if the user requires that their exec processes be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
2109
2120
  */
2110
2121
  dockerBuild: (opts?: DirectoryDockerBuildOpts) => Container;
2111
2122
  /**
@@ -2120,14 +2131,14 @@ export declare class Directory extends BaseClient {
2120
2131
  */
2121
2132
  export: (path: string, opts?: DirectoryExportOpts) => Promise<string>;
2122
2133
  /**
2123
- * Retrieves a file at the given path.
2134
+ * Retrieve a file at the given path.
2124
2135
  * @param path Location of the file to retrieve (e.g., "README.md").
2125
2136
  */
2126
2137
  file: (path: string) => File;
2127
2138
  /**
2128
- * Retrieves this directory as per exclude/include filters.
2129
- * @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
2130
- * @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
2139
+ * Return a snapshot with some paths included or excluded
2140
+ * @param opts.exclude If set, paths matching one of these glob patterns is excluded from the new snapshot. Example: ["node_modules/", ".git*", ".env"]
2141
+ * @param opts.include If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
2131
2142
  */
2132
2143
  filter: (opts?: DirectoryFilterOpts) => Directory;
2133
2144
  /**
@@ -2154,7 +2165,7 @@ export declare class Directory extends BaseClient {
2154
2165
  */
2155
2166
  terminal: (opts?: DirectoryTerminalOpts) => Directory;
2156
2167
  /**
2157
- * Retrieves this directory plus a directory written at the given path.
2168
+ * Return a snapshot with a directory added
2158
2169
  * @param path Location of the written directory (e.g., "/src/").
2159
2170
  * @param directory Identifier of the directory to copy.
2160
2171
  * @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
@@ -2182,10 +2193,10 @@ export declare class Directory extends BaseClient {
2182
2193
  */
2183
2194
  withNewDirectory: (path: string, opts?: DirectoryWithNewDirectoryOpts) => Directory;
2184
2195
  /**
2185
- * Retrieves this directory plus a new file written at the given path.
2186
- * @param path Location of the written file (e.g., "/file.txt").
2187
- * @param contents Content of the written file (e.g., "Hello world!").
2188
- * @param opts.permissions Permission given to the copied file (e.g., 0600).
2196
+ * Return a snapshot with a new file added
2197
+ * @param path Path of the new file. Example: "foo/bar.txt"
2198
+ * @param contents Contents of the new file. Example: "Hello world!"
2199
+ * @param opts.permissions Permissions of the new file. Example: 0600
2189
2200
  */
2190
2201
  withNewFile: (path: string, contents: string, opts?: DirectoryWithNewFileOpts) => Directory;
2191
2202
  /**
@@ -2196,18 +2207,18 @@ export declare class Directory extends BaseClient {
2196
2207
  */
2197
2208
  withTimestamps: (timestamp: number) => Directory;
2198
2209
  /**
2199
- * Retrieves this directory with the directory at the given path removed.
2200
- * @param path Location of the directory to remove (e.g., ".github/").
2210
+ * Return a snapshot with a subdirectory removed
2211
+ * @param path Path of the subdirectory to remove. Example: ".github/workflows"
2201
2212
  */
2202
2213
  withoutDirectory: (path: string) => Directory;
2203
2214
  /**
2204
- * Retrieves this directory with the file at the given path removed.
2205
- * @param path Location of the file to remove (e.g., "/file.txt").
2215
+ * Return a snapshot with a file removed
2216
+ * @param path Path of the file to remove (e.g., "/file.txt").
2206
2217
  */
2207
2218
  withoutFile: (path: string) => Directory;
2208
2219
  /**
2209
- * Retrieves this directory with the files at the given paths removed.
2210
- * @param paths Location of the file to remove (e.g., ["/file.txt"]).
2220
+ * Return a snapshot with files removed
2221
+ * @param paths Paths of the files to remove (e.g., ["/file.txt"]).
2211
2222
  */
2212
2223
  withoutFiles: (paths: string[]) => Directory;
2213
2224
  /**
@@ -3150,6 +3161,7 @@ export declare class Host extends BaseClient {
3150
3161
  * The file is limited to a size of 512000 bytes.
3151
3162
  * @param name The user defined name for this secret.
3152
3163
  * @param path Location of the file to set as a secret.
3164
+ * @deprecated setSecretFile is superceded by use of the secret API with file:// URIs
3153
3165
  */
3154
3166
  setSecretFile: (name: string, path: string) => Secret;
3155
3167
  /**
@@ -3800,10 +3812,10 @@ export declare class Client extends BaseClient {
3800
3812
  */
3801
3813
  cacheVolume: (key: string, opts?: ClientCacheVolumeOpts) => CacheVolume;
3802
3814
  /**
3803
- * Creates a scratch container.
3815
+ * Creates a scratch container, with no image or metadata.
3804
3816
  *
3805
- * Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
3806
- * @param opts.platform Platform to initialize the container with.
3817
+ * To pull an image, follow up with the "from" function.
3818
+ * @param opts.platform Platform to initialize the container with. Defaults to the native platform of the current engine
3807
3819
  */
3808
3820
  container: (opts?: ClientContainerOpts) => Container;
3809
3821
  /**
@@ -4037,10 +4049,6 @@ export declare class Client extends BaseClient {
4037
4049
  * Load a Secret from its ID.
4038
4050
  */
4039
4051
  loadSecretFromID: (id: SecretID) => Secret;
4040
- /**
4041
- * Load a Secret from its Name.
4042
- */
4043
- loadSecretFromName: (name: string, opts?: ClientLoadSecretFromNameOpts) => Secret;
4044
4052
  /**
4045
4053
  * Load a Service from its ID.
4046
4054
  */