104 references to AddContainer
Aspire.Hosting (2)
ContainerResourceBuilderExtensions.cs (1)
353
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)
63
builder.
AddContainer
("my-container", "my-image");
94
var container = builder.
AddContainer
(KnownResourceNames.AspireDashboard, "my-image");
290
builder.
AddContainer
("my-container", "my-image").WithHttpEndpoint(port: 8080, targetPort: 58080);
329
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");
738
builder.
AddContainer
("database", "image")
773
builder.
AddContainer
("database", "image")
833
var ctr = builder.
AddContainer
("database", "image");
851
builder.
AddContainer
("database", "image")
887
builder.
AddContainer
("database", "image")
924
builder.
AddContainer
("database", "image")
958
builder.
AddContainer
("database", "image");
976
var container = builder.
AddContainer
("database", "image");
DistributedApplicationTests.cs (8)
248
testProgram.AppBuilder.
AddContainer
("redis-cli", "redis")
279
testProgram.AppBuilder.
AddContainer
("redis0", "redis")
359
testProgram.AppBuilder.
AddContainer
("redis0", "redis")
496
testProgram.AppBuilder.
AddContainer
("redis-cli", "redis")
529
testProgram.AppBuilder.
AddContainer
("redis-cli", "redis")
562
testProgram.AppBuilder.
AddContainer
("redis-cli", "redis")
596
testProgram.AppBuilder.
AddContainer
("redis-cli", "redis")
878
var redis = builder.
AddContainer
("dummyRedis", "redis").WithEndpoint("tcp", endpoint =>
HealthCheckTests.cs (2)
22
builder.
AddContainer
("resource", "dummycontainer")
44
builder.
AddContainer
("resource", "dummycontainer")
ManifestGenerationTests.cs (2)
96
var redis = builder.
AddContainer
("redis", "redis");
294
program.AppBuilder.
AddContainer
("testresource", "testresource");
ProjectResourceTests.cs (1)
570
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)
19
var throwingResource = builder.
AddContainer
("throwingresource", "doesnotmatter")
21
var dependingContainerResource = builder.
AddContainer
("dependingcontainerresource", "doesnotmatter")
WithEndpointTests.cs (11)
229
var container = builder.
AddContainer
("app", "image")
247
var container = builder.
AddContainer
("app", "image")
268
var container = builder.
AddContainer
("app", "image")
296
var container = builder.
AddContainer
("app", "image")
323
var container = builder.
AddContainer
("app", "image")
350
var container = builder.
AddContainer
("app", "image")
377
var container = builder.
AddContainer
("app", "image")
404
var container = builder.
AddContainer
("app", "image")
431
var container = builder.
AddContainer
("app", "image")
556
var container0 = builder.
AddContainer
("app0", "image")
559
var container1 = builder.
AddContainer
("app1", "image")
WithEnvironmentTests.cs (6)
18
var container = builder.
AddContainer
("container", "image")
181
var container = builder.
AddContainer
("container1", "image")
190
var containerB = builder.
AddContainer
("container2", "imageB")
217
var container = builder.
AddContainer
("container1", "image")
226
var containerB = builder.
AddContainer
("container2", "imageB")
245
var targetBuilder = builder.
AddContainer
("targetContainer", "targetImage");