Dagger NodeJS SDK
Enumerations​
Classes​
- CacheVolume
- Container
- Directory
- EnvVariable
- File
- GitRef
- GitRepository
- Host
- HostVariable
- Label
- Port
- Project
- Secret
- Socket
- default
Type Aliases​
BuildArg​
BuildArg: Object
Type declaration​
Name | Type | Description |
---|---|---|
name | string | The build argument name. |
value | string | The build argument value. |
CacheID​
CacheID: string
& { __CacheID
: never
}
A global cache volume identifier.
ClientContainerOpts​
ClientContainerOpts: Object
Type declaration​
Name | Type |
---|---|
id? | ContainerID |
platform? | Platform |
ClientDirectoryOpts​
ClientDirectoryOpts: Object
Type declaration​
Name | Type |
---|---|
id? | DirectoryID |
ClientGitOpts​
ClientGitOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
experimentalServiceHost? | Container | A service which must be started before the repo is fetched. |
keepGitDir? | boolean | Set to true to keep .git directory. |
ClientHttpOpts​
ClientHttpOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
experimentalServiceHost? | Container | A service which must be started before the URL is fetched. |
ClientPipelineOpts​
ClientPipelineOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
description? | string | Pipeline description. |
labels? | PipelineLabel [] | Pipeline labels. |
ClientSocketOpts​
ClientSocketOpts: Object
Type declaration​
Name | Type |
---|---|
id? | SocketID |
ContainerBuildOpts​
ContainerBuildOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
buildArgs? | BuildArg [] | Additional build arguments. |
dockerfile? | string | Path to the Dockerfile to use. Default: './Dockerfile'. |
target? | string | Target build stage to build. |
ContainerEndpointOpts​
ContainerEndpointOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
port? | number | The exposed port number for the endpoint |
scheme? | string | Return a URL with the given scheme, eg. http for http:// |
ContainerExecOpts​
ContainerExecOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
args? | string [] | Command to run instead of the container's default command (e.g., ["run", "main.go"]). |
experimentalPrivilegedNesting? | boolean | Provide dagger access to the executed command. 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. |
redirectStderr? | string | Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). |
redirectStdout? | string | Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). |
stdin? | string | Content to write to the command's standard input before closing (e.g., "Hello world"). |
ContainerExportOpts​
ContainerExportOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
platformVariants? | Container [] | Identifiers for other platform specific containers. Used for multi-platform image. |
ContainerID​
ContainerID: string
& { __ContainerID
: never
}
A unique container identifier. Null designates an empty container (scratch).
ContainerPipelineOpts​
ContainerPipelineOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
description? | string | Pipeline description. |
labels? | PipelineLabel [] | Pipeline labels. |
ContainerPublishOpts​
ContainerPublishOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
platformVariants? | Container [] | Identifiers for other platform specific containers. Used for multi-platform image. |
ContainerWithDefaultArgsOpts​
ContainerWithDefaultArgsOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
args? | string [] | Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). |
ContainerWithDirectoryOpts​
ContainerWithDirectoryOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
exclude? | string [] | Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]). |
include? | string [] | Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]). |
ContainerWithExecOpts​
ContainerWithExecOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
experimentalPrivilegedNesting? | boolean | Provides dagger access to the executed command. 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. |
insecureRootCapabilities? | boolean | 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. |
redirectStderr? | string | Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). |
redirectStdout? | string | Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). |
stdin? | string | Content to write to the command's standard input before closing (e.g., "Hello world"). |
ContainerWithExposedPortOpts​
ContainerWithExposedPortOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
description? | string | Optional port description |
protocol? | NetworkProtocol | Transport layer network protocol |
ContainerWithFileOpts​
ContainerWithFileOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
permissions? | number | Permission given to the copied file (e.g., 0600). Default: 0644. |
ContainerWithMountedCacheOpts​
ContainerWithMountedCacheOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
sharing? | CacheSharingMode | Sharing mode of the cache volume. |
source? | Directory | Identifier of the directory to use as the cache volume's root. |
ContainerWithNewFileOpts​
ContainerWithNewFileOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
contents? | string | Content of the file to write (e.g., "Hello world!"). |
permissions? | number | Permission given to the written file (e.g., 0600). Default: 0644. |
ContainerWithoutExposedPortOpts​
ContainerWithoutExposedPortOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
protocol? | NetworkProtocol | Port protocol to unexpose |
DateTime​
DateTime: string
& { __DateTime
: never
}
The DateTime
scalar type represents a DateTime. The DateTime is serialized as an RFC 3339 quoted string
DirectoryDockerBuildOpts​
DirectoryDockerBuildOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
buildArgs? | BuildArg [] | Build arguments to use in the build. |
dockerfile? | string | Path to the Dockerfile to use (e.g., "frontend.Dockerfile"). Defaults: './Dockerfile'. |
platform? | Platform | The platform to build. |
target? | string | Target build stage to build. |
DirectoryEntriesOpts​
DirectoryEntriesOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
path? | string | Location of the directory to look at (e.g., "/src"). |
DirectoryID​
DirectoryID: string
& { __DirectoryID
: never
}
A content-addressed directory identifier.
DirectoryPipelineOpts​
DirectoryPipelineOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
description? | string | Pipeline description. |
labels? | PipelineLabel [] | Pipeline labels. |
DirectoryWithDirectoryOpts​
DirectoryWithDirectoryOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
exclude? | string [] | Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). |
include? | string [] | Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). |
DirectoryWithFileOpts​
DirectoryWithFileOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
permissions? | number | Permission given to the copied file (e.g., 0600). Default: 0644. |
DirectoryWithNewDirectoryOpts​
DirectoryWithNewDirectoryOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
permissions? | number | Permission granted to the created directory (e.g., 0777). Default: 0755. |
DirectoryWithNewFileOpts​
DirectoryWithNewFileOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
permissions? | number | Permission given to the copied file (e.g., 0600). Default: 0644. |
FileID​
FileID: string
& { __FileID
: never
}
A file identifier.
GitRefTreeOpts​
GitRefTreeOpts: Object
Type declaration​
Name | Type |
---|---|
sshAuthSocket? | Socket |
sshKnownHosts? | string |
HostDirectoryOpts​
HostDirectoryOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
exclude? | string [] | Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). |
include? | string [] | Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). |
HostWorkdirOpts​
HostWorkdirOpts: Object
Type declaration​
Name | Type | Description |
---|---|---|
exclude? | string [] | Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). |
include? | string [] | Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). |
ID​
ID: string
& { __ID
: never
}
The ID
scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4"
) or integer (such as 4
) input value will be accepted as an ID.
PipelineLabel​
PipelineLabel: Object
Type declaration​
Name | Type | Description |
---|---|---|
name | string | Label name. |
value | string | Label value. |
Platform​
Platform: string
& { __Platform
: never
}
The platform config OS and architecture in a Container.
The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64").
SecretID​
SecretID: string
& { __SecretID
: never
}
A unique identifier for a secret.
SocketID​
SocketID: string
& { __SocketID
: never
}
A content-addressed socket identifier.
__TypeEnumValuesOpts​
__TypeEnumValuesOpts: Object
Type declaration​
Name | Type |
---|---|
includeDeprecated? | boolean |
__TypeFieldsOpts​
__TypeFieldsOpts: Object
Type declaration​
Name | Type |
---|---|
includeDeprecated? | boolean |