104 references to AddContainer
Aspire.Hosting (2)
ContainerResourceBuilderExtensions.cs (1)
353return 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"); 361builder.AddContainer("api", "myimage") 761builder.AddContainer("api", "myimage") 860builder.AddContainer("api", "myimage") 974builder.AddContainer("api", "myimage") 1110builder.AddContainer("api", "image") 1286builder.AddContainer("api1", "myimage"); 1373builder.AddContainer("api", "myimage") 1471builder.AddContainer("api", "myimage") 1575builder.AddContainer("api", "myimage") 1811builder.AddContainer("api", "myimage") 1830builder.AddContainer("api", "myimage") 1851builder.AddContainer("api", "myimage") 1870builder.AddContainer("api", "myimage") 1890builder.AddContainer("api", "myimage") 1909builder.AddContainer("api", "myimage")
Aspire.Hosting.Containers.Tests (27)
ContainerResourceBuilderTests.cs (7)
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");
ContainerResourceTests.cs (5)
18appBuilder.AddContainer("container", "none"); 59var c1 = appBuilder.AddContainer("c1", "image2") 66var c2 = appBuilder.AddContainer("container", "none") 168appBuilder.AddContainer("container", "none") 233builder.AddContainer("containerwithbindmounts", "image/name")
WithDockerfileTests.cs (15)
31builder.AddContainer("testcontainer", "testimage") 63builder.AddContainer("testcontainer", "testimage") 96builder.AddContainer("testcontainer", "testimage") 167var container = builder.AddContainer("testcontainer", "testimage") 262var container = builder.AddContainer("testcontainer", "testimage") 351builder.AddContainer("testcontainer", "testimage") 488builder.AddContainer("mycontainer", "myimage") 517builder.AddContainer("mycontainer", "myimage") 542builder.AddContainer("mycontainer", "myimage") 571builder.AddContainer("mycontainer", "myimage") 596var container = builder.AddContainer("mycontainer", "myimage"); 617var container = builder.AddContainer("mycontainer", "myimage") 648var container = builder.AddContainer("mycontainer", "myimage") 679var container = builder.AddContainer("mycontainer", "myimage") 710var container = builder.AddContainer("mycontainer", "myimage")
Aspire.Hosting.Dapr.Tests (2)
DaprTests.cs (2)
26builder.AddContainer("name", "image") 108var containerResource = builder.AddContainer("name", "image")
Aspire.Hosting.Milvus.Tests (1)
AddMilvusTests.cs (1)
117var container1 = appBuilder.AddContainer("container1", "fake")
Aspire.Hosting.Qdrant.Tests (1)
AddQdrantTests.cs (1)
191var container1 = appBuilder.AddContainer("container1", "fake")
Aspire.Hosting.Tests (54)
Dashboard\DashboardResourceTests.cs (4)
63builder.AddContainer("my-container", "my-image"); 94var container = builder.AddContainer(KnownResourceNames.AspireDashboard, "my-image"); 290builder.AddContainer("my-container", "my-image").WithHttpEndpoint(port: 8080, targetPort: 58080); 329builder.AddContainer("my-container", "my-image").WithHttpEndpoint(port: 8080, targetPort: 58080);
Dcp\ApplicationExecutorTests.cs (11)
30builder.AddContainer("CustomName", "container").WithOtlpExporter(); 442builder.AddContainer("database", "image"); 531builder.AddContainer("database", "image"); 738builder.AddContainer("database", "image") 773builder.AddContainer("database", "image") 833var ctr = builder.AddContainer("database", "image"); 851builder.AddContainer("database", "image") 887builder.AddContainer("database", "image") 924builder.AddContainer("database", "image") 958builder.AddContainer("database", "image"); 976var container = builder.AddContainer("database", "image");
DistributedApplicationTests.cs (8)
248testProgram.AppBuilder.AddContainer("redis-cli", "redis") 279testProgram.AppBuilder.AddContainer("redis0", "redis") 359testProgram.AppBuilder.AddContainer("redis0", "redis") 496testProgram.AppBuilder.AddContainer("redis-cli", "redis") 529testProgram.AppBuilder.AddContainer("redis-cli", "redis") 562testProgram.AppBuilder.AddContainer("redis-cli", "redis") 596testProgram.AppBuilder.AddContainer("redis-cli", "redis") 878var redis = builder.AddContainer("dummyRedis", "redis").WithEndpoint("tcp", endpoint =>
HealthCheckTests.cs (2)
22builder.AddContainer("resource", "dummycontainer") 44builder.AddContainer("resource", "dummycontainer")
ManifestGenerationTests.cs (2)
96var redis = builder.AddContainer("redis", "redis"); 294program.AppBuilder.AddContainer("testresource", "testresource");
ProjectResourceTests.cs (1)
570var c1 = appBuilder.AddContainer("c1", "image2")
ResourceCommandAnnotationTests.cs (1)
40var resourceBuilder = builder.AddContainer("name", "image");
Schema\SchemaTests.cs (6)
55builder.AddContainer("mycontainer", "myimage").WithDockerfile(tempContextPath); 68builder.AddContainer("mycontainer", "myimage") 86builder.AddContainer("mycontainer", "myimage") 118builder.AddContainer("foo", "bar").WithContainerRuntimeArgs("one", "two", "three"); 157builder.AddContainer("mycontainer", "myimage") 167builder.AddContainer("mycontainer", "myimage")
WaitForTests.cs (2)
19var throwingResource = builder.AddContainer("throwingresource", "doesnotmatter") 21var dependingContainerResource = builder.AddContainer("dependingcontainerresource", "doesnotmatter")
WithEndpointTests.cs (11)
229var container = builder.AddContainer("app", "image") 247var container = builder.AddContainer("app", "image") 268var container = builder.AddContainer("app", "image") 296var container = builder.AddContainer("app", "image") 323var container = builder.AddContainer("app", "image") 350var container = builder.AddContainer("app", "image") 377var container = builder.AddContainer("app", "image") 404var container = builder.AddContainer("app", "image") 431var container = builder.AddContainer("app", "image") 556var container0 = builder.AddContainer("app0", "image") 559var container1 = builder.AddContainer("app1", "image")
WithEnvironmentTests.cs (6)
18var container = builder.AddContainer("container", "image") 181var container = builder.AddContainer("container1", "image") 190var containerB = builder.AddContainer("container2", "imageB") 217var container = builder.AddContainer("container1", "image") 226var containerB = builder.AddContainer("container2", "imageB") 245var targetBuilder = builder.AddContainer("targetContainer", "targetImage");