commit 31a74f7ce803dd5f2e6fb52de0f27e2ff1b3afef Author: Tommy Parnell Date: Fri Oct 7 09:54:51 2016 -0400 init files diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..49373de --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM microsoft/iis + +COPY . /scripts + +WORKDIR /scripts + +RUN powershell -File shrink-image.ps1 diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..490d2c3 Binary files /dev/null and b/LICENSE.md differ diff --git a/shrink-image.ps1 b/shrink-image.ps1 new file mode 100644 index 0000000..794e648 --- /dev/null +++ b/shrink-image.ps1 @@ -0,0 +1,16 @@ +iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) +choco install -y boxstarter +BoxstarterShell +Remove-WindowsFeature -Name 'Powershell-ISE' +Get-WindowsFeature | +? { $_.InstallState -eq 'Available' } | +Uninstall-WindowsFeature -Remove +Install-WindowsUpdate -AcceptEula +$pageFileMemoryKey = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" +Set-ItemProperty -Path $pageFileMemoryKey -Name PagingFiles -Value "" +Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase +Optimize-volume -DriveLetter c +wget http://download.sysinternals.com/files/SDelete.zip -OutFile sdelete.zip +[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") +[System.IO.Compression.ZipFile]::ExtractToDirectory("sdelete.zip", ".") +./sdelete.exe /accepteula -z c: \ No newline at end of file