init files

This commit is contained in:
Tommy Parnell
2016-10-07 09:54:51 -04:00
commit 31a74f7ce8
3 changed files with 23 additions and 0 deletions

7
Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
FROM microsoft/iis
COPY . /scripts
WORKDIR /scripts
RUN powershell -File shrink-image.ps1

BIN
LICENSE.md Normal file

Binary file not shown.

16
shrink-image.ps1 Normal file
View File

@@ -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: