Freigeben über


ContainerResourceBuilderExtensions.WithBindMount<T> Method

Definition

Adds a bind mount to a container resource.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithBindMount<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, string source, string target, bool isReadOnly = false) where T : Aspire.Hosting.ApplicationModel.ContainerResource;
static member WithBindMount : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.ContainerResource)> * string * string * bool -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.ContainerResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.ContainerResource)
<Extension()>
Public Function WithBindMount(Of T As ContainerResource) (builder As IResourceBuilder(Of T), source As String, target As String, Optional isReadOnly As Boolean = false) As IResourceBuilder(Of T)

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The resource builder.

source
String

The source path of the mount. This is the path to the file or directory on the host.

target
String

The target path where the file or directory is mounted in the container.

isReadOnly
Boolean

A flag that indicates if this is a read-only mount.

Returns

The IResourceBuilder<T>.

Applies to