104 references to AddContainer
Aspire.Hosting (3)
ContainerResourceBuilderExtensions.cs (2)
43return AddContainer(builder, name, image) 429return builder.AddContainer(name, "placeholder") // Image name will be replaced by WithDockerfile.
IDistributedApplicationBuilder.cs (1)
140/// This example shows the implementation of the <see cref="ContainerResourceBuilderExtensions.AddContainer(IDistributedApplicationBuilder, string, string)"/>
Aspire.Hosting.Azure.Tests (17)
AzureBicepProvisionerTests.cs (1)
35var container = builder.AddContainer("foo", "image")
AzureContainerAppsTests.cs (16)
27builder.AddContainer("api", "myimage"); 586builder.AddContainer("api", "myimage") 972builder.AddContainer("api", "myimage") 1071builder.AddContainer("api", "myimage") 1185builder.AddContainer("api", "myimage") 1321builder.AddContainer("api", "image") 1497builder.AddContainer("api1", "myimage"); 1584builder.AddContainer("api", "myimage") 1682builder.AddContainer("api", "myimage") 1786builder.AddContainer("api", "myimage") 2022builder.AddContainer("api", "myimage") 2041builder.AddContainer("api", "myimage") 2062builder.AddContainer("api", "myimage") 2081builder.AddContainer("api", "myimage") 2101builder.AddContainer("api", "myimage") 2120builder.AddContainer("api", "myimage")
Aspire.Hosting.Containers.Tests (27)
ContainerResourceBuilderTests.cs (8)
16var redis = builder.AddContainer("redis", "redis").WithImage("redis-stack"); 24var redis = builder.AddContainer("redis", "redis").WithImage("redis-stack", "1.0.0"); 33var container = builder.AddContainer("app", "some-image"); 45var container = builder.AddContainer("app", "some-image"); 57var redis = builder.AddContainer("redis", "redis").WithImageTag("7.1"); 65var redis = builder.AddContainer("redis", "redis").WithImageRegistry("myregistry.azurecr.io"); 73var redis = builder.AddContainer("redis", "redis").WithImageSHA256("42b5c726e719639fcc1e9dbc13dd843f567dcd37911d0e1abb9f47f2cc1c95cd"); 197.AddContainer("redis", "image")
ContainerResourceTests.cs (7)
18appBuilder.AddContainer("container", "none"); 56appBuilder.AddContainer("container", "image:tag"); 76appBuilder.AddContainer("container", "imagewithdigest@sha256:01234567890abcdef01234567890abcdef01234567890abcdef01234567890ab"); 99var c1 = appBuilder.AddContainer("c1", "image2") 106var c2 = appBuilder.AddContainer("container", "none") 208appBuilder.AddContainer("container", "none") 273builder.AddContainer("containerwithbindmounts", "image/name")
WithDockerfileTests.cs (12)
31builder.AddContainer("testcontainer", "testimage") 62builder.AddContainer("testcontainer", "testimage") 95builder.AddContainer("testcontainer", "testimage") 166var container = builder.AddContainer("testcontainer", "testimage") 261var container = builder.AddContainer("testcontainer", "testimage") 350builder.AddContainer("testcontainer", "testimage") 487builder.AddContainer("mycontainer", "myimage") 514var container = builder.AddContainer("mycontainer", "myimage"); 535var container = builder.AddContainer("mycontainer", "myimage") 566var container = builder.AddContainer("mycontainer", "myimage") 597var container = builder.AddContainer("mycontainer", "myimage") 628var container = builder.AddContainer("mycontainer", "myimage")
Aspire.Hosting.Milvus.Tests (1)
AddMilvusTests.cs (1)
113var container1 = appBuilder.AddContainer("container1", "fake")
Aspire.Hosting.Qdrant.Tests (1)
AddQdrantTests.cs (1)
188var container1 = appBuilder.AddContainer("container1", "fake")
Aspire.Hosting.Tests (55)
Dashboard\DashboardResourceTests.cs (4)
64builder.AddContainer("my-container", "my-image"); 95var container = builder.AddContainer(KnownResourceNames.AspireDashboard, "my-image"); 293builder.AddContainer("my-container", "my-image").WithHttpEndpoint(port: 8080, targetPort: 58080); 336builder.AddContainer("my-container", "my-image").WithHttpEndpoint(port: 8080, targetPort: 58080);
Dcp\DcpExecutorTests.cs (11)
29builder.AddContainer("CustomName", "container").WithOtlpExporter(); 447builder.AddContainer("database", "image"); 536builder.AddContainer("database", "image"); 742builder.AddContainer("database", "image") 777builder.AddContainer("database", "image") 837var ctr = builder.AddContainer("database", "image"); 855builder.AddContainer("database", "image") 891builder.AddContainer("database", "image") 928builder.AddContainer("database", "image") 962builder.AddContainer("database", "image"); 997var container = builder.AddContainer("database", "image");
DistributedApplicationTests.cs (8)
291testProgram.AppBuilder.AddContainer("redis-cli", "redis") 322testProgram.AppBuilder.AddContainer("redis0", "redis") 411testProgram.AppBuilder.AddContainer("redis0", "redis") 539testProgram.AppBuilder.AddContainer("redis-cli", "redis") 568testProgram.AppBuilder.AddContainer("redis-cli", "redis") 597testProgram.AppBuilder.AddContainer("redis-cli", "redis") 627testProgram.AppBuilder.AddContainer("redis-cli", "redis") 959var redis = builder.AddContainer("dummyRedis", "redis").WithEndpoint("tcp", endpoint =>
HealthCheckTests.cs (2)
23builder.AddContainer("resource", "dummycontainer") 45builder.AddContainer("resource", "dummycontainer")
ManifestGenerationTests.cs (2)
97var redis = builder.AddContainer("redis", "redis"); 258program.AppBuilder.AddContainer("testresource", "testresource");
Orchestrator\ApplicationOrchestratorTests.cs (1)
23var parentResource = builder.AddContainer("database", "image");
ProjectResourceTests.cs (1)
571var c1 = appBuilder.AddContainer("c1", "image2")
ResourceCommandAnnotationTests.cs (1)
43var resourceBuilder = builder.AddContainer("name", "image");
Schema\SchemaTests.cs (6)
55builder.AddContainer("mycontainer", "myimage").WithDockerfile(tempContextPath); 68builder.AddContainer("mycontainer", "myimage") 86builder.AddContainer("mycontainer", "myimage") 122builder.AddContainer("foo", "bar").WithContainerRuntimeArgs("one", "two", "three"); 161builder.AddContainer("mycontainer", "myimage") 171builder.AddContainer("mycontainer", "myimage")
WaitForTests.cs (2)
21var throwingResource = builder.AddContainer("throwingresource", "doesnotmatter") 23var dependingContainerResource = builder.AddContainer("dependingcontainerresource", "doesnotmatter")
WithEndpointTests.cs (11)
230var container = builder.AddContainer("app", "image") 248var container = builder.AddContainer("app", "image") 269var container = builder.AddContainer("app", "image") 297var container = builder.AddContainer("app", "image") 324var container = builder.AddContainer("app", "image") 351var container = builder.AddContainer("app", "image") 378var container = builder.AddContainer("app", "image") 405var container = builder.AddContainer("app", "image") 432var container = builder.AddContainer("app", "image") 557var container0 = builder.AddContainer("app0", "image") 560var container1 = builder.AddContainer("app1", "image")
WithEnvironmentTests.cs (6)
19var container = builder.AddContainer("container", "image") 182var container = builder.AddContainer("container1", "image") 191var containerB = builder.AddContainer("container2", "imageB") 218var container = builder.AddContainer("container1", "image") 227var containerB = builder.AddContainer("container2", "imageB") 246var targetBuilder = builder.AddContainer("targetContainer", "targetImage");