Last active
February 6, 2016 23:30
-
-
Save ianblenke/a7654bcbbc2f4c83c0f3 to your computer and use it in GitHub Desktop.
Installing docker, docker-machine, docker-compose, git, ssh, using chocolatey
This file contains hidden or 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
# To run this in a Powershell, copy and paste this: | |
# Set-ExecutionPolicy Unrestricted ; icm $executioncontext.InvokeCommand.NewScriptBlock((New-Object Net.WebClient).DownloadString('https://gist.githubusercontent.com/ianblenke/a7654bcbbc2f4c83c0f3/raw')) | |
$coreEditions = @(0x0c,0x27,0x0e,0x29,0x2a,0x0d,0x28,0x1d) | |
$IsCore = $coreEditions -contains (Get-WmiObject -Query "Select OperatingSystemSKU from Win32_OperatingSystem" | Select -ExpandProperty OperatingSystemSKU) | |
cd $Env:USERPROFILE | |
Set-Location -Path $Env:USERPROFILE | |
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
if (-not $IsCore) | |
{ | |
Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) | |
} | |
else | |
{ | |
$tempDir = Join-Path $env:TEMP "chocInstall" | |
if (![System.IO.Directory]::Exists($tempDir)) {[System.IO.Directory]::CreateDirectory($tempDir)} | |
$file = Join-Path $tempDir "chocolatey.zip" | |
$client.DownloadFile("http://chocolatey.org/api/v1/package/chocolatey", $file) | |
&7z x $file `-o`"$tempDir`" | |
Add-Content $log -value 'Extracted Chocolatey' | |
$chocInstallPS1 = Join-Path (Join-Path $tempDir 'tools') 'chocolateyInstall.ps1' | |
& $chocInstallPS1 | |
Add-Content $log -value 'Installed Chocolatey / Verifying Paths' | |
} | |
$Env:Path += ';C:\ProgramData\Chocolatey\bin' | |
SetX Path "${Env:Path}" /m | |
chocolatey feature enable -n allowGlobalConfirmation | |
# Install git + ssh cli | |
choco install msysgit | |
$Env:Path += ';C:\Program Files (x86)\Git\bin' | |
SetX Path "${Env:Path}" /m | |
choco install docker | |
choco install docker-machine | |
choco install docker-compose | |
choco install terraform | |
choco install awscli | |
$Env:Path += ';C:\Program Files\Amazon\AWSCLI' | |
SetX Path "${Env:Path}" /m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
msysgit is listed as deprecated, and suggests using "choco install git" instead.