Skip to content

Commit ae94433

Browse files
committed
Changed Docker detection.
1 parent 2f0431b commit ae94433

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/PostSharp.Engineering.BuildTools/Docker/PrologComponent.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public override void WriteDockerfile( StreamWriter writer )
3030
ENV POWERSHELL_UPDATECHECK=FALSE
3131
ENV TEMP=C:\Temp
3232
ENV TMP=C:\Temp
33+
ENV RUNNING_IN_DOCKER=TRUE
3334
3435
# Enable long path support
3536
RUN Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1

src/PostSharp.Engineering.BuildTools/Utilities/DockerHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ internal static class DockerHelper
88
{
99
public static bool IsDockerBuild()
1010
{
11-
var s = Environment.GetEnvironmentVariable( "COMPLUS_RUNNING_IN_CONTAINER" );
11+
var s = Environment.GetEnvironmentVariable( "RUNNING_IN_DOCKER" );
1212

1313
return s != null && ((bool.TryParse( s, out var b ) && b) || (int.TryParse( s, out var i ) && i != 0));
1414
}

0 commit comments

Comments
 (0)