58 types derived from ContainerResource
Aspire.Hosting (2)
Aspire.Hosting.Azure.AppConfiguration (1)
Aspire.Hosting.Azure.CosmosDB (1)
Aspire.Hosting.Azure.EventHubs (1)
Aspire.Hosting.Azure.Kusto (1)
Aspire.Hosting.Azure.ServiceBus (1)
Aspire.Hosting.Azure.SignalR (1)
Aspire.Hosting.Azure.Storage (1)
Aspire.Hosting.CodeGeneration.Go.Tests (3)
Aspire.Hosting.CodeGeneration.Java.Tests (3)
Aspire.Hosting.CodeGeneration.Python.Tests (3)
Aspire.Hosting.CodeGeneration.Rust.Tests (3)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (3)
Aspire.Hosting.Containers.Tests (1)
Aspire.Hosting.Docker (1)
Aspire.Hosting.Garnet (1)
Aspire.Hosting.Kafka (2)
Aspire.Hosting.Keycloak (1)
Aspire.Hosting.Milvus (2)
Aspire.Hosting.MongoDB (2)
Aspire.Hosting.MySql (2)
Aspire.Hosting.Nats (1)
Aspire.Hosting.Oracle (1)
Aspire.Hosting.PostgreSQL (4)
Aspire.Hosting.Qdrant (1)
Aspire.Hosting.RabbitMQ (1)
Aspire.Hosting.Redis (3)
Aspire.Hosting.Seq (1)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.Tests (6)
Aspire.Hosting.Valkey (1)
Aspire.Hosting.Yarp (1)
Aspire.Hosting.Yarp.Tests (1)
39 instantiations of ContainerResource
Aspire.Hosting (1)
Aspire.Hosting.Tests (38)
ApplicationModel\Docker\DockerfileBuilderCallbackAnnotationTests.cs (6)
56var context = new DockerfileBuilderCallbackContext(new ContainerResource("test"), builder, services, CancellationToken.None);
83var context = new DockerfileBuilderCallbackContext(new ContainerResource("test"), builder, services, CancellationToken.None);
110var context = new DockerfileBuilderCallbackContext(new ContainerResource("test"), builder, services, CancellationToken.None);
140var context = new DockerfileBuilderCallbackContext(new ContainerResource("test"), builder, services, CancellationToken.None);
186var context = new DockerfileBuilderCallbackContext(new ContainerResource("test"), builder, services, CancellationToken.None);
221var context = new DockerfileBuilderCallbackContext(new ContainerResource("test"), builder, services, CancellationToken.None);
172 references to ContainerResource
Aspire.Hosting (68)
ContainerResourceBuilderExtensions.cs (47)
29internal static IResourceBuilder<T> EnsureBuildAndPushPipelineAnnotations<T>(this IResourceBuilder<T> builder) where T : ContainerResource
94public static IResourceBuilder<ContainerResource> AddContainer(this IDistributedApplicationBuilder builder, [ResourceName] string name, string image)
100var container = new ContainerResource(name);
115public static IResourceBuilder<ContainerResource> AddContainer(this IDistributedApplicationBuilder builder, [ResourceName] string name, string image, string tag)
157public static IResourceBuilder<T> WithVolume<T>(this IResourceBuilder<T> builder, string? name, string target, bool isReadOnly = false) where T : ContainerResource
198public static IResourceBuilder<T> WithVolume<T>(this IResourceBuilder<T> builder, string target) where T : ContainerResource
254public static IResourceBuilder<T> WithBindMount<T>(this IResourceBuilder<T> builder, string source, string target, bool isReadOnly = false) where T : ContainerResource
274public static IResourceBuilder<T> WithEntrypoint<T>(this IResourceBuilder<T> builder, string entrypoint) where T : ContainerResource
291public static IResourceBuilder<T> WithImageTag<T>(this IResourceBuilder<T> builder, string tag) where T : ContainerResource
322public static IResourceBuilder<T> WithImageRegistry<T>(this IResourceBuilder<T> builder, string? registry) where T : ContainerResource
344public static IResourceBuilder<T> WithImage<T>(this IResourceBuilder<T> builder, string image, string? tag = null) where T : ContainerResource
411public static IResourceBuilder<T> WithImageSHA256<T>(this IResourceBuilder<T> builder, string sha256) where T : ContainerResource
436public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, params string[] args) where T : ContainerResource
455public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, Action<ContainerRuntimeArgsCallbackContext> callback) where T : ContainerResource
479public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, Func<ContainerRuntimeArgsCallbackContext, Task> callback) where T : ContainerResource
509public static IResourceBuilder<T> WithLifetime<T>(this IResourceBuilder<T> builder, ContainerLifetime lifetime) where T : ContainerResource
524public static IResourceBuilder<T> WithImagePullPolicy<T>(this IResourceBuilder<T> builder, ImagePullPolicy pullPolicy) where T : ContainerResource
530private static IResourceBuilder<T> ThrowResourceIsNotContainer<T>(IResourceBuilder<T> builder) where T : ContainerResource
541public static IResourceBuilder<T> PublishAsContainer<T>(this IResourceBuilder<T> builder) where T : ContainerResource
551/// <typeparam name="T">Type parameter specifying any type derived from <see cref="ContainerResource"/>/</typeparam>
559/// When this method is called an annotation is added to the <see cref="ContainerResource"/> that specifies the context path and
586public static IResourceBuilder<T> WithDockerfile<T>(this IResourceBuilder<T> builder, string contextPath, string? dockerfilePath = null, string? stage = null) where T : ContainerResource
643/// <typeparam name="T">Type parameter specifying any type derived from <see cref="ContainerResource"/>.</typeparam>
651/// When this method is called, an annotation is added to the <see cref="ContainerResource"/> that specifies the context path
679public static IResourceBuilder<T> WithDockerfileFactory<T>(this IResourceBuilder<T> builder, string contextPath, Func<DockerfileFactoryContext, string> dockerfileFactory, string? stage = null) where T : ContainerResource
690/// <typeparam name="T">Type parameter specifying any type derived from <see cref="ContainerResource"/>.</typeparam>
698/// When this method is called, an annotation is added to the <see cref="ContainerResource"/> that specifies the context path
727public static IResourceBuilder<T> WithDockerfileFactory<T>(this IResourceBuilder<T> builder, string contextPath, Func<DockerfileFactoryContext, Task<string>> dockerfileFactory, string? stage = null) where T : ContainerResource
820public static IResourceBuilder<ContainerResource> AddDockerfile(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, string? dockerfilePath = null, string? stage = null)
850public static IResourceBuilder<ContainerResource> AddDockerfileFactory(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, Func<DockerfileFactoryContext, string> dockerfileFactory, string? stage = null)
881public static IResourceBuilder<ContainerResource> AddDockerfileFactory(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, Func<DockerfileFactoryContext, Task<string>> dockerfileFactory, string? stage = null)
930public static IResourceBuilder<ContainerResource> AddDockerfileBuilder(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, Func<DockerfileBuilderCallbackContext, Task> callback, string? stage = null)
978public static IResourceBuilder<ContainerResource> AddDockerfileBuilder(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, Action<DockerfileBuilderCallbackContext> callback, string? stage = null)
1003public static IResourceBuilder<T> WithContainerName<T>(this IResourceBuilder<T> builder, string name) where T : ContainerResource
1044public static IResourceBuilder<T> WithBuildArg<T>(this IResourceBuilder<T> builder, string name, object? value) where T : ContainerResource
1095public static IResourceBuilder<T> WithBuildArg<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> value) where T : ContainerResource
1143public static IResourceBuilder<T> WithBuildSecret<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> value) where T : ContainerResource
1174where TResource : ContainerResource
1230public static IResourceBuilder<T> WithContainerFiles<T>(this IResourceBuilder<T> builder, string destinationPath, IEnumerable<ContainerFileSystemItem> entries, int? defaultOwner = null, int? defaultGroup = null, UnixFileMode? umask = null) where T : ContainerResource
1303public static IResourceBuilder<T> WithContainerFiles<T>(this IResourceBuilder<T> builder, string destinationPath, Func<ContainerFileSystemCallbackContext, CancellationToken, Task<IEnumerable<ContainerFileSystemItem>>> callback, int? defaultOwner = null, int? defaultGroup = null, UnixFileMode? umask = null) where T : ContainerResource
1336public static IResourceBuilder<T> WithContainerFiles<T>(this IResourceBuilder<T> builder, string destinationPath, string sourcePath, int? defaultOwner = null, int? defaultGroup = null, UnixFileMode? umask = null) where T : ContainerResource
1386public static IResourceBuilder<T> WithEndpointProxySupport<T>(this IResourceBuilder<T> builder, bool proxyEnabled) where T : ContainerResource
1398/// <typeparam name="T">Type parameter specifying any type derived from <see cref="ContainerResource"/>.</typeparam>
1436public static IResourceBuilder<T> WithDockerfileBuilder<T>(this IResourceBuilder<T> builder, string contextPath, Func<DockerfileBuilderCallbackContext, Task> callback, string? stage = null) where T : ContainerResource
1505/// <typeparam name="T">Type parameter specifying any type derived from <see cref="ContainerResource"/>.</typeparam>
1541public static IResourceBuilder<T> WithDockerfileBuilder<T>(this IResourceBuilder<T> builder, string contextPath, Action<DockerfileBuilderCallbackContext> callback, string? stage = null) where T : ContainerResource
1615public static IResourceBuilder<T> WithContainerNetworkAlias<T>(this IResourceBuilder<T> builder, string alias) where T : ContainerResource
Aspire.Hosting.Azure.AppContainers (2)
Aspire.Hosting.Azure.Tests (4)
Aspire.Hosting.CodeGeneration.Go.Tests (1)
Aspire.Hosting.CodeGeneration.Java.Tests (1)
Aspire.Hosting.CodeGeneration.Python.Tests (1)
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
Aspire.Hosting.Docker (1)
Aspire.Hosting.Foundry (3)
Aspire.Hosting.Kubernetes (1)
Aspire.Hosting.MySql.Tests (1)
Aspire.Hosting.RemoteHost.Tests (1)
Aspire.Hosting.Tests (85)
ExecutionConfigurationGathererTests.cs (21)
119var resource = builder.AddContainer("test", "image")
142var resource = builder.AddContainer("test", "image")
165var resource = builder.AddContainer("test", "image").Resource;
183var resource = builder.AddContainer("test", "image")
216var resource = builder.AddContainer("test", "image")
243var resource = builder.AddContainer("test", "image")
273var resource = builder.AddContainer("test", "image")
301var resource = builder.AddContainer("test", "image")
326var resource = builder.AddContainer("test", "image").Resource;
349var resource = builder.AddContainer("test", "image")
378var resource = builder.AddContainer("test", "image")
409var resource = builder.AddContainer("test", "image")
441var resource = builder.AddContainer("test", "image")
478var resource = builder.AddContainer("test", "image")
568var resource = builder.AddContainer("test", "image")
608var resource = builder.AddContainer("test", "image")
637var resource = builder.AddContainer("test", "image")
668var resource = builder.AddContainer("test", "image")
693var resource = builder.AddContainer("test", "image").Resource;
714var resource = builder.AddContainer("test", "image")
750var resource = builder.AddContainer("test", "image")
Pipelines.AppHost (1)