View Source Dagger.Directory (dagger v0.8.7)
A directory.
Link to this section Summary
Functions
Gets the difference between this directory and an another directory.
Retrieves a directory at the given path.
Builds a new Docker container from this directory.
Returns a list of files and directories at the given path.
Writes the contents of the directory to a path on the host.
Retrieves a file at the given path.
The content-addressed identifier of the directory.
Creates a named sub-pipeline
Force evaluation in the engine.
Retrieves this directory plus a directory written at the given path.
Retrieves this directory plus the contents of the given file copied to the given path.
Retrieves this directory plus a new directory created at the given path.
Retrieves this directory plus a new file written at the given path.
Retrieves this directory with all file/dir timestamps set to the given time.
Retrieves this directory with the directory at the given path removed.
Retrieves this directory with the file at the given path removed.
Link to this section Types
Link to this section Functions
Gets the difference between this directory and an another directory.
required-arguments
Required Arguments
other
- Identifier of the directory to compare.
@spec directory(t(), Dagger.String.t()) :: t()
Retrieves a directory at the given path.
required-arguments
Required Arguments
path
- Location of the directory to retrieve (e.g., "/src").
@spec docker_build( t(), keyword() ) :: Dagger.Container.t()
Builds a new Docker container from this directory.
optional-arguments
Optional Arguments
dockerfile
- Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
Defaults: './Dockerfile'.
platform
- The platform to build.build_args
- Build arguments to use in the build.target
- Target build stage to build.secrets
- Secrets to pass to the build.
They will be mounted at /run/secrets/[secret-name].
@spec entries( t(), keyword() ) :: {:ok, [Dagger.String.t()]} | {:error, term()}
Returns a list of files and directories at the given path.
optional-arguments
Optional Arguments
path
- Location of the directory to look at (e.g., "/src").
@spec export(t(), Dagger.String.t()) :: {:ok, Dagger.Boolean.t()} | {:error, term()}
Writes the contents of the directory to a path on the host.
required-arguments
Required Arguments
path
- Location of the copied directory (e.g., "logs/").
@spec file(t(), Dagger.String.t()) :: Dagger.File.t()
Retrieves a file at the given path.
required-arguments
Required Arguments
path
- Location of the file to retrieve (e.g., "README.md").
@spec id(t()) :: {:ok, Dagger.DirectoryID.t()} | {:error, term()}
The content-addressed identifier of the directory.
@spec pipeline(t(), Dagger.String.t(), keyword()) :: t()
Creates a named sub-pipeline
required-arguments
Required Arguments
name
- Pipeline name.
optional-arguments
Optional Arguments
description
- Pipeline description.labels
- Pipeline labels.
@spec sync(t()) :: {:ok, Dagger.DirectoryID.t()} | {:error, term()}
Force evaluation in the engine.
@spec with_directory(t(), Dagger.String.t(), t(), keyword()) :: t()
Retrieves this directory plus a directory written at the given path.
required-arguments
Required Arguments
path
- Location of the written directory (e.g., "/src/").directory
- Identifier of the directory to copy.
optional-arguments
Optional Arguments
exclude
- Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).include
- Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
@spec with_file(t(), Dagger.String.t(), Dagger.File.t(), keyword()) :: t()
Retrieves this directory plus the contents of the given file copied to the given path.
required-arguments
Required Arguments
path
- Location of the copied file (e.g., "/file.txt").source
- Identifier of the file to copy.
optional-arguments
Optional Arguments
permissions
- Permission given to the copied file (e.g., 0600).
Default: 0644.
@spec with_new_directory(t(), Dagger.String.t(), keyword()) :: t()
Retrieves this directory plus a new directory created at the given path.
required-arguments
Required Arguments
path
- Location of the directory created (e.g., "/logs").
optional-arguments
Optional Arguments
permissions
- Permission granted to the created directory (e.g., 0777).
Default: 0755.
@spec with_new_file(t(), Dagger.String.t(), Dagger.String.t(), keyword()) :: t()
Retrieves this directory plus a new file written at the given path.
required-arguments
Required Arguments
path
- Location of the written file (e.g., "/file.txt").contents
- Content of the written file (e.g., "Hello world!").
optional-arguments
Optional Arguments
permissions
- Permission given to the copied file (e.g., 0600).
Default: 0644.
@spec with_timestamps(t(), Dagger.Int.t()) :: t()
Retrieves this directory with all file/dir timestamps set to the given time.
required-arguments
Required Arguments
timestamp
- Timestamp to set dir/files in.
Formatted in seconds following Unix epoch (e.g., 1672531199).
@spec without_directory(t(), Dagger.String.t()) :: t()
Retrieves this directory with the directory at the given path removed.
required-arguments
Required Arguments
path
- Location of the directory to remove (e.g., ".github/").
@spec without_file(t(), Dagger.String.t()) :: t()
Retrieves this directory with the file at the given path removed.
required-arguments
Required Arguments
path
- Location of the file to remove (e.g., "/file.txt").