Last active
July 23, 2018 17:37
-
-
Save ElanHasson/f03a9b512add3521acf20f062dd19f31 to your computer and use it in GitHub Desktop.
For kubernetes on windows pause image:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$BaseDir = "c:\k" | |
cd $BaseDir | |
$computerInfo = Get-ComputerInfo | |
$windowsBase = if ($computerInfo.WindowsVersion -eq "1709") { | |
"microsoft/nanoserver:1709" | |
} elseif ( ($computerInfo.WindowsVersion -eq "1803") -and ($computerInfo.WindowsBuildLabEx.StartsWith("17134")) ) { | |
"microsoft/nanoserver:1803" | |
} else { | |
# This is a temporary workaround. As of May 2018, Windows Server Insider builds still report 1803 which is wrong. | |
# Once that is fixed, add another elseif ( -eq "nnnn") instead and remove the StartsWith("17134") above | |
"microsoft/nanoserver-insider" | |
} | |
"FROM $($windowsBase)" | Out-File -encoding ascii -FilePath Dockerfile | |
"CMD cmd /c ping -t localhost" | Out-File -encoding ascii -FilePath Dockerfile -Append | |
docker build -t kubeletwin/pause . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based off of https://github.com/Azure/acs-engine/pull/2976/files/9152d6ba047d99ce9e56fd479e37c3b9bde3c9f3