Skip to main content

Dagger NodeJS SDK

Enumerations

Classes

Type Aliases

BuildArg

BuildArg: Object

Type declaration

NameTypeDescription
namestringThe build argument name.
valuestringThe build argument value.

CacheID

CacheID: string & { __CacheID: never }

A global cache volume identifier.


ClientContainerOpts

ClientContainerOpts: Object

Type declaration

NameType
id?ContainerID
platform?Platform

ClientDirectoryOpts

ClientDirectoryOpts: Object

Type declaration

NameType
id?DirectoryID

ClientGitOpts

ClientGitOpts: Object

Type declaration

NameTypeDescription
experimentalServiceHost?ContainerA service which must be started before the repo is fetched.
keepGitDir?booleanSet to true to keep .git directory.

ClientHttpOpts

ClientHttpOpts: Object

Type declaration

NameTypeDescription
experimentalServiceHost?ContainerA service which must be started before the URL is fetched.

ClientPipelineOpts

ClientPipelineOpts: Object

Type declaration

NameTypeDescription
description?stringPipeline description.
labels?PipelineLabel[]Pipeline labels.

ClientSocketOpts

ClientSocketOpts: Object

Type declaration

NameType
id?SocketID

ContainerBuildOpts

ContainerBuildOpts: Object

Type declaration

NameTypeDescription
buildArgs?BuildArg[]Additional build arguments.
dockerfile?stringPath to the Dockerfile to use. Default: './Dockerfile'.
target?stringTarget build stage to build.

ContainerEndpointOpts

ContainerEndpointOpts: Object

Type declaration

NameTypeDescription
port?numberThe exposed port number for the endpoint
scheme?stringReturn a URL with the given scheme, eg. http for http://

ContainerExecOpts

ContainerExecOpts: Object

Type declaration

NameTypeDescription
args?string[]Command to run instead of the container's default command (e.g., ["run", "main.go"]).
experimentalPrivilegedNesting?booleanProvide 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?stringRedirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
redirectStdout?stringRedirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
stdin?stringContent to write to the command's standard input before closing (e.g., "Hello world").

ContainerExportOpts

ContainerExportOpts: Object

Type declaration

NameTypeDescription
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

NameTypeDescription
description?stringPipeline description.
labels?PipelineLabel[]Pipeline labels.

ContainerPublishOpts

ContainerPublishOpts: Object

Type declaration

NameTypeDescription
platformVariants?Container[]Identifiers for other platform specific containers. Used for multi-platform image.

ContainerWithDefaultArgsOpts

ContainerWithDefaultArgsOpts: Object

Type declaration

NameTypeDescription
args?string[]Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).

ContainerWithDirectoryOpts

ContainerWithDirectoryOpts: Object

Type declaration

NameTypeDescription
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

NameTypeDescription
experimentalPrivilegedNesting?booleanProvides 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?booleanExecute 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?stringRedirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
redirectStdout?stringRedirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
stdin?stringContent to write to the command's standard input before closing (e.g., "Hello world").

ContainerWithExposedPortOpts

ContainerWithExposedPortOpts: Object

Type declaration

NameTypeDescription
description?stringOptional port description
protocol?NetworkProtocolTransport layer network protocol

ContainerWithFileOpts

ContainerWithFileOpts: Object

Type declaration

NameTypeDescription
permissions?numberPermission given to the copied file (e.g., 0600). Default: 0644.

ContainerWithMountedCacheOpts

ContainerWithMountedCacheOpts: Object

Type declaration

NameTypeDescription
sharing?CacheSharingModeSharing mode of the cache volume.
source?DirectoryIdentifier of the directory to use as the cache volume's root.

ContainerWithNewFileOpts

ContainerWithNewFileOpts: Object

Type declaration

NameTypeDescription
contents?stringContent of the file to write (e.g., "Hello world!").
permissions?numberPermission given to the written file (e.g., 0600). Default: 0644.

ContainerWithoutExposedPortOpts

ContainerWithoutExposedPortOpts: Object

Type declaration

NameTypeDescription
protocol?NetworkProtocolPort 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

NameTypeDescription
buildArgs?BuildArg[]Build arguments to use in the build.
dockerfile?stringPath to the Dockerfile to use (e.g., "frontend.Dockerfile"). Defaults: './Dockerfile'.
platform?PlatformThe platform to build.
target?stringTarget build stage to build.

DirectoryEntriesOpts

DirectoryEntriesOpts: Object

Type declaration

NameTypeDescription
path?stringLocation of the directory to look at (e.g., "/src").

DirectoryID

DirectoryID: string & { __DirectoryID: never }

A content-addressed directory identifier.


DirectoryPipelineOpts

DirectoryPipelineOpts: Object

Type declaration

NameTypeDescription
description?stringPipeline description.
labels?PipelineLabel[]Pipeline labels.

DirectoryWithDirectoryOpts

DirectoryWithDirectoryOpts: Object

Type declaration

NameTypeDescription
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

NameTypeDescription
permissions?numberPermission given to the copied file (e.g., 0600). Default: 0644.

DirectoryWithNewDirectoryOpts

DirectoryWithNewDirectoryOpts: Object

Type declaration

NameTypeDescription
permissions?numberPermission granted to the created directory (e.g., 0777). Default: 0755.

DirectoryWithNewFileOpts

DirectoryWithNewFileOpts: Object

Type declaration

NameTypeDescription
permissions?numberPermission given to the copied file (e.g., 0600). Default: 0644.

FileID

FileID: string & { __FileID: never }

A file identifier.


GitRefTreeOpts

GitRefTreeOpts: Object

Type declaration

NameType
sshAuthSocket?Socket
sshKnownHosts?string

HostDirectoryOpts

HostDirectoryOpts: Object

Type declaration

NameTypeDescription
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

NameTypeDescription
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

NameTypeDescription
namestringLabel name.
valuestringLabel 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

NameType
includeDeprecated?boolean

__TypeFieldsOpts

__TypeFieldsOpts: Object

Type declaration

NameType
includeDeprecated?boolean