104 references to AddContainer
Aspire.Hosting (2)
ContainerResourceBuilderExtensions.cs (1)
404
return 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)
35
var container = builder.
AddContainer
("foo", "image")
AzureContainerAppsTests.cs (16)
27
builder.
AddContainer
("api", "myimage");
361
builder.
AddContainer
("api", "myimage")
761
builder.
AddContainer
("api", "myimage")
860
builder.
AddContainer
("api", "myimage")
974
builder.
AddContainer
("api", "myimage")
1110
builder.
AddContainer
("api", "image")
1286
builder.
AddContainer
("api1", "myimage");
1373
builder.
AddContainer
("api", "myimage")
1471
builder.
AddContainer
("api", "myimage")
1575
builder.
AddContainer
("api", "myimage")
1811
builder.
AddContainer
("api", "myimage")
1830
builder.
AddContainer
("api", "myimage")
1851
builder.
AddContainer
("api", "myimage")
1870
builder.
AddContainer
("api", "myimage")
1890
builder.
AddContainer
("api", "myimage")
1909
builder.
AddContainer
("api", "myimage")
Aspire.Hosting.Containers.Tests (27)
ContainerResourceBuilderTests.cs (7)
16
var redis = builder.
AddContainer
("redis", "redis").WithImage("redis-stack");
24
var redis = builder.
AddContainer
("redis", "redis").WithImage("redis-stack", "1.0.0");
33
var container = builder.
AddContainer
("app", "some-image");
45
var container = builder.
AddContainer
("app", "some-image");
57
var redis = builder.
AddContainer
("redis", "redis").WithImageTag("7.1");
65
var redis = builder.
AddContainer
("redis", "redis").WithImageRegistry("myregistry.azurecr.io");
73
var redis = builder.
AddContainer
("redis", "redis").WithImageSHA256("42b5c726e719639fcc1e9dbc13dd843f567dcd37911d0e1abb9f47f2cc1c95cd");
ContainerResourceTests.cs (5)
18
appBuilder.
AddContainer
("container", "none");
59
var c1 = appBuilder.
AddContainer
("c1", "image2")
66
var c2 = appBuilder.
AddContainer
("container", "none")
168
appBuilder.
AddContainer
("container", "none")
233
builder.
AddContainer
("containerwithbindmounts", "image/name")
WithDockerfileTests.cs (15)
31
builder.
AddContainer
("testcontainer", "testimage")
63
builder.
AddContainer
("testcontainer", "testimage")
96
builder.
AddContainer
("testcontainer", "testimage")
167
var container = builder.
AddContainer
("testcontainer", "testimage")
262
var container = builder.
AddContainer
("testcontainer", "testimage")
351
builder.
AddContainer
("testcontainer", "testimage")
488
builder.
AddContainer
("mycontainer", "myimage")
517
builder.
AddContainer
("mycontainer", "myimage")
542
builder.
AddContainer
("mycontainer", "myimage")
571
builder.
AddContainer
("mycontainer", "myimage")
596
var container = builder.
AddContainer
("mycontainer", "myimage");
617
var container = builder.
AddContainer
("mycontainer", "myimage")
648
var container = builder.
AddContainer
("mycontainer", "myimage")
679
var container = builder.
AddContainer
("mycontainer", "myimage")
710
var container = builder.
AddContainer
("mycontainer", "myimage")
Aspire.Hosting.Dapr.Tests (2)
DaprTests.cs (2)
26
builder.
AddContainer
("name", "image")
108
var containerResource = builder.
AddContainer
("name", "image")
Aspire.Hosting.Milvus.Tests (1)
AddMilvusTests.cs (1)
117
var container1 = appBuilder.
AddContainer
("container1", "fake")
Aspire.Hosting.Qdrant.Tests (1)
AddQdrantTests.cs (1)
191
var container1 = appBuilder.
AddContainer
("container1", "fake")
Aspire.Hosting.Tests (54)
Dashboard\DashboardResourceTests.cs (4)
64
builder.
AddContainer
("my-container", "my-image");
95
var container = builder.
AddContainer
(KnownResourceNames.AspireDashboard, "my-image");
293
builder.
AddContainer
("my-container", "my-image").WithHttpEndpoint(port: 8080, targetPort: 58080);
336
builder.
AddContainer
("my-container", "my-image").WithHttpEndpoint(port: 8080, targetPort: 58080);
Dcp\ApplicationExecutorTests.cs (11)
30
builder.
AddContainer
("CustomName", "container").WithOtlpExporter();
442
builder.
AddContainer
("database", "image");
531
builder.
AddContainer
("database", "image");
737
builder.
AddContainer
("database", "image")
772
builder.
AddContainer
("database", "image")
832
var ctr = builder.
AddContainer
("database", "image");
850
builder.
AddContainer
("database", "image")
886
builder.
AddContainer
("database", "image")
923
builder.
AddContainer
("database", "image")
957
builder.
AddContainer
("database", "image");
975
var container = builder.
AddContainer
("database", "image");
DistributedApplicationTests.cs (8)
243
testProgram.AppBuilder.
AddContainer
("redis-cli", "redis")
274
testProgram.AppBuilder.
AddContainer
("redis0", "redis")
351
testProgram.AppBuilder.
AddContainer
("redis0", "redis")
479
testProgram.AppBuilder.
AddContainer
("redis-cli", "redis")
508
testProgram.AppBuilder.
AddContainer
("redis-cli", "redis")
537
testProgram.AppBuilder.
AddContainer
("redis-cli", "redis")
567
testProgram.AppBuilder.
AddContainer
("redis-cli", "redis")
844
var redis = builder.
AddContainer
("dummyRedis", "redis").WithEndpoint("tcp", endpoint =>
HealthCheckTests.cs (2)
23
builder.
AddContainer
("resource", "dummycontainer")
45
builder.
AddContainer
("resource", "dummycontainer")
ManifestGenerationTests.cs (2)
97
var redis = builder.
AddContainer
("redis", "redis");
295
program.AppBuilder.
AddContainer
("testresource", "testresource");
ProjectResourceTests.cs (1)
571
var c1 = appBuilder.
AddContainer
("c1", "image2")
ResourceCommandAnnotationTests.cs (1)
40
var resourceBuilder = builder.
AddContainer
("name", "image");
Schema\SchemaTests.cs (6)
55
builder.
AddContainer
("mycontainer", "myimage").WithDockerfile(tempContextPath);
68
builder.
AddContainer
("mycontainer", "myimage")
86
builder.
AddContainer
("mycontainer", "myimage")
118
builder.
AddContainer
("foo", "bar").WithContainerRuntimeArgs("one", "two", "three");
157
builder.
AddContainer
("mycontainer", "myimage")
167
builder.
AddContainer
("mycontainer", "myimage")
WaitForTests.cs (2)
20
var throwingResource = builder.
AddContainer
("throwingresource", "doesnotmatter")
22
var dependingContainerResource = builder.
AddContainer
("dependingcontainerresource", "doesnotmatter")
WithEndpointTests.cs (11)
230
var container = builder.
AddContainer
("app", "image")
248
var container = builder.
AddContainer
("app", "image")
269
var container = builder.
AddContainer
("app", "image")
297
var container = builder.
AddContainer
("app", "image")
324
var container = builder.
AddContainer
("app", "image")
351
var container = builder.
AddContainer
("app", "image")
378
var container = builder.
AddContainer
("app", "image")
405
var container = builder.
AddContainer
("app", "image")
432
var container = builder.
AddContainer
("app", "image")
557
var container0 = builder.
AddContainer
("app0", "image")
560
var container1 = builder.
AddContainer
("app1", "image")
WithEnvironmentTests.cs (6)
19
var container = builder.
AddContainer
("container", "image")
182
var container = builder.
AddContainer
("container1", "image")
191
var containerB = builder.
AddContainer
("container2", "imageB")
218
var container = builder.
AddContainer
("container1", "image")
227
var containerB = builder.
AddContainer
("container2", "imageB")
246
var targetBuilder = builder.
AddContainer
("targetContainer", "targetImage");