共用方式為


KeycloakResourceBuilderExtensions.WithDataBindMount Method

Definition

Adds a bind mount for the data folder to a Keycloak container resource.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.KeycloakResource> WithDataBindMount (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.KeycloakResource> builder, string source);
static member WithDataBindMount : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.KeycloakResource> * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.KeycloakResource>
<Extension()>
Public Function WithDataBindMount (builder As IResourceBuilder(Of KeycloakResource), source As String) As IResourceBuilder(Of KeycloakResource)

Parameters

builder
IResourceBuilder<KeycloakResource>

The resource builder.

source
String

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

Returns

The IResourceBuilder<T>.

Examples

Use a bind mount

var keycloak = builder.AddKeycloak("keycloak")
                      .WithDataBindMount("mydata");

Remarks

The source directory is mounted at /opt/keycloak/data in the container.

Applies to