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 6
6
set isDistroless to find(OS_VERSION, "distroless") >= 0 || find(OS_VERSION, "chiseled") >= 0 ^
7
7
set lineContinuation to when(isWindows, "`", "\") ^
8
8
set port to when(isDistroless, "8080", "80") ^
9
- set httpPort to "8080" ^
10
- set httpsPort to "8443"
9
+ set httpPort to "8080"
11
10
}}ENV {{lineContinuation}}
12
11
{{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
14
13
ASPNETCORE_HTTP_PORTS={{httpPort}} {{lineContinuation}}}}
15
14
{{InsertTemplate("Dockerfile.env.container")}}{{if isAlpine || (isDistroless && !(isMariner && find(OS_VERSION, "1.0") > 0)): {{lineContinuation}}
16
15
# 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
22
22
public bool IsArm => Arch == Arch . Arm || Arch == Arch . Arm64 ;
23
23
public string OS { get ; set ; }
24
24
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 ;
27
26
28
27
private static readonly Lazy < JObject > s_imageInfoData ;
29
28
@@ -68,9 +67,6 @@ public string Platform
68
67
69
68
public bool IsWindows => OS . StartsWith ( Tests . OS . NanoServer ) || OS . StartsWith ( Tests . OS . ServerCore ) ;
70
69
71
- public virtual int DefaultPort => IsDistroless ? 8080 : 80 ;
72
- public virtual int DefaultHTTPSPort => 443 ;
73
-
74
70
public string Rid
75
71
{
76
72
get
Original file line number Diff line number Diff line change @@ -58,11 +58,6 @@ public override int DefaultPort
58
58
get => ( IsDistroless | Version . Major >= 8 ) ? 8080 : 80 ;
59
59
}
60
60
61
- public override int DefaultHTTPSPort
62
- {
63
- get => ( IsDistroless | Version . Major >= 8 ) ? 8443 : 443 ;
64
- }
65
-
66
61
public string GetDockerfilePath ( DotNetImageType imageType ) =>
67
62
$ "src/{ GetVariantName ( imageType ) } /{ Version } /{ OSTag } /{ GetArchLabel ( ) } ";
68
63
You can’t perform that action at this time.
0 commit comments