View Source Dagger.Host (dagger v0.9.6)
Information about the host execution environment.
Link to this section Summary
Functions
Accesses a directory on the host.
Accesses a file on the host.
Creates a service that forwards traffic to a specified address via the host.
Sets a secret given a user-defined name and the file path on the host, and returns the secret. The file is limited to a size of 512000 bytes.
Creates a tunnel that forwards traffic from the host to a service.
Accesses a Unix socket on the host.
Link to this section Types
Link to this section Functions
@spec directory(t(), Dagger.String.t(), keyword()) :: Dagger.Directory.t()
Accesses a directory on the host.
required-arguments
Required Arguments
path
- Location of the directory to access (e.g., ".").
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 file(t(), Dagger.String.t()) :: Dagger.File.t()
Accesses a file on the host.
required-arguments
Required Arguments
path
- Location of the file to retrieve (e.g., "README.md").
@spec service(t(), [Dagger.PortForward.t()], keyword()) :: Dagger.Service.t()
Creates a service that forwards traffic to a specified address via the host.
required-arguments
Required Arguments
ports
- Ports to expose via the service, forwarding through the host network.
If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
An empty set of ports is not valid; an error will be returned.
optional-arguments
Optional Arguments
host
- Upstream host to forward traffic to.
@spec set_secret_file(t(), Dagger.String.t(), Dagger.String.t()) :: Dagger.Secret.t()
Sets a secret given a user-defined name and the file path on the host, and returns the secret. The file is limited to a size of 512000 bytes.
required-arguments
Required Arguments
name
- The user defined name for this secret.path
- Location of the file to set as a secret.
@spec tunnel(t(), Dagger.Service.t(), keyword()) :: Dagger.Service.t()
Creates a tunnel that forwards traffic from the host to a service.
required-arguments
Required Arguments
service
- Service to send traffic from the tunnel.
optional-arguments
Optional Arguments
native
- Map each service port to the same port on the host, as if the service were running natively.
Note: enabling may result in port conflicts.
ports
- Configure explicit port forwarding rules for the tunnel.
If a port's frontend is unspecified or 0, a random port will be chosen by the host.
If no ports are given, all of the service's ports are forwarded. If native is true, each port maps to the same port on the host. If native is false, each port maps to a random port chosen by the host.
If ports are given and native is true, the ports are additive.
@spec unix_socket(t(), Dagger.String.t()) :: Dagger.Socket.t()
Accesses a Unix socket on the host.
required-arguments
Required Arguments
path
- Location of the Unix socket (e.g., "/var/run/docker.sock").