Freigeben über


MongoDBBuilderExtensions.WithInitBindMount Method

Definition

Adds a bind mount for the init folder to a MongoDB container resource.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.MongoDBServerResource> WithInitBindMount (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.MongoDBServerResource> builder, string source, bool isReadOnly = true);
static member WithInitBindMount : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.MongoDBServerResource> * string * bool -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.MongoDBServerResource>
<Extension()>
Public Function WithInitBindMount (builder As IResourceBuilder(Of MongoDBServerResource), source As String, Optional isReadOnly As Boolean = true) As IResourceBuilder(Of MongoDBServerResource)

Parameters

builder
IResourceBuilder<MongoDBServerResource>

The resource builder.

source
String

The source directory on the host to mount into the container.

isReadOnly
Boolean

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

Returns

The IResourceBuilder<T>.

Applies to