File tree Expand file tree Collapse file tree 3 files changed +3
-13
lines changed
tests/Microsoft.DotNet.Docker.Tests Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Original file line number Diff line number Diff line change 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)
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments