Skip to content

Commit f9d6e45

Browse files
authored
Remove customizations for ASP.NET Core applications' ContainerEnvironmentVariables and ContainerPorts (#280)
1 parent e35d96a commit f9d6e45

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

docs/ContainerCustomization.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,6 @@ ContainerEntrypointArg items have one property:
174174
</ItemGroup>
175175
```
176176

177-
## ASP.NET Core customizations
178-
179-
ASP.NET Core applications have certain defaults that are set to make containers more 'plug and play'.
180-
181-
* A ContainerPort item is set to expose TCP port 80
182-
* The ASPNETCORE_URLS environment variable is set to `http://+:80` to match that port value.
183-
184-
Both of these will be skipped if a custom value is set.
185-
186177
## Default container labels
187178

188179
Labels are often used to provide consistent metadata on container images. This package provides some default labels to encourage better maintainability of the generated images.

packaging/build/Microsoft.NET.Build.Containers.targets

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,6 @@
8080
<ContainerLabel Include="org.opencontainers.image.created" Value="$([System.DateTime]::UtcNow.ToString('o'))" />
8181
</ItemGroup>
8282

83-
<!-- Asp.NET defaults -->
84-
<ItemGroup Label="ASP.NET port forwarding" Condition="'$(_IsAspNet)' == 'true'">
85-
<ContainerPort Include="80" Type="tcp" Condition="@(ContainerPort->WithMetadataValue('Identity', '80')->AnyHaveMetadataValue('Type', 'tcp')) == ''" />
86-
87-
<ContainerEnvironmentVariable Include="ASPNETCORE_URLS" Value="http://+:80"
88-
Condition="@(ContainerEnvironmentVariable->WithMetadataValue('Identity', 'ASPNETCORE_URLS')) == ''"/>
89-
</ItemGroup>
90-
9183
<ParseContainerProperties FullyQualifiedBaseImageName="$(ContainerBaseImage)"
9284
ContainerRegistry="$(ContainerRegistry)"
9385
ContainerImageName="$(ContainerImageName)"

0 commit comments

Comments
 (0)