105 references to AddContainer
Aspire.Hosting (2)
ContainerResourceBuilderExtensions.cs (1)
411return 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 (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\ApplicationExecutorTests.cs (12)
31builder.AddContainer("CustomName", "container").WithOtlpExporter(); 443builder.AddContainer("database", "image"); 532builder.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"); 996var parentResource = builder.AddContainer("database", "image");
DistributedApplicationTests.cs (8)
243testProgram.AppBuilder.AddContainer("redis-cli", "redis") 274testProgram.AppBuilder.AddContainer("redis0", "redis") 351testProgram.AppBuilder.AddContainer("redis0", "redis") 479testProgram.AppBuilder.AddContainer("redis-cli", "redis") 508testProgram.AppBuilder.AddContainer("redis-cli", "redis") 537testProgram.AppBuilder.AddContainer("redis-cli", "redis") 567testProgram.AppBuilder.AddContainer("redis-cli", "redis") 844var 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"); 295program.AppBuilder.AddContainer("testresource", "testresource");
ProjectResourceTests.cs (1)
571var 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)
20var throwingResource = builder.AddContainer("throwingresource", "doesnotmatter") 22var 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");