Skip to content

Commit bd831bf

Browse files
authored
Remove https port variables
1 parent a60cc4f commit bd831bf

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

eng/dockerfile-templates/Dockerfile.common-dotnet-envs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
set isDistroless to find(OS_VERSION, "distroless") >= 0 || find(OS_VERSION, "chiseled") >= 0 ^
77
set lineContinuation to when(isWindows, "`", "\") ^
88
set port to when(isDistroless, "8080", "80") ^
9-
set httpPort to "8080" ^
10-
set httpsPort to "8443"
9+
set httpPort to "8080"
1110
}}ENV {{lineContinuation}}
1211
{{if dotnetVersion != "8.0":# Configure web servers to bind to port {{port}} when present
13-
ASPNETCORE_URLS=http://+:{{port}} {{lineContinuation}}^else:# Configure web servers to bind to port {{httpPort}}/{{httpsPort}} when present
12+
ASPNETCORE_URLS=http://+:{{port}} {{lineContinuation}}^else:# Configure web servers to bind to port {{httpPort}} when present
1413
ASPNETCORE_HTTP_PORTS={{httpPort}} {{lineContinuation}}}}
1514
{{InsertTemplate("Dockerfile.env.container")}}{{if isAlpine || (isDistroless && !(isMariner && find(OS_VERSION, "1.0") > 0)): {{lineContinuation}}
1615
# Set the invariant mode since ICU package isn't included (see https://github.com/dotnet/announcements/issues/20)

tests/Microsoft.DotNet.Docker.Tests/ImageData.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public abstract class ImageData
2222
public bool IsArm => Arch == Arch.Arm || Arch == Arch.Arm64;
2323
public string OS { get; set; }
2424
public bool IsDistroless => OS.Contains("distroless") || OS.Contains("chiseled");
25-
// public int DefaultPort { get; }
26-
// public int DefaultHTTPSPort { get; }
25+
public virtual int DefaultPort => IsDistroless ? 8080 : 80;
2726

2827
private static readonly Lazy<JObject> s_imageInfoData;
2928

@@ -68,9 +67,6 @@ public string Platform
6867

6968
public bool IsWindows => OS.StartsWith(Tests.OS.NanoServer) || OS.StartsWith(Tests.OS.ServerCore);
7069

71-
public virtual int DefaultPort => IsDistroless ? 8080 : 80;
72-
public virtual int DefaultHTTPSPort => 443;
73-
7470
public string Rid
7571
{
7672
get

tests/Microsoft.DotNet.Docker.Tests/ProductImageData.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ public override int DefaultPort
5858
get => (IsDistroless | Version.Major >= 8) ? 8080 : 80;
5959
}
6060

61-
public override int DefaultHTTPSPort
62-
{
63-
get => (IsDistroless | Version.Major >= 8) ? 8443 : 443;
64-
}
65-
6661
public string GetDockerfilePath(DotNetImageType imageType) =>
6762
$"src/{GetVariantName(imageType)}/{Version}/{OSTag}/{GetArchLabel()}";
6863

0 commit comments

Comments
 (0)