init files
This commit is contained in:
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM microsoft/iis
|
||||
|
||||
COPY . /scripts
|
||||
|
||||
WORKDIR /scripts
|
||||
|
||||
RUN powershell -File shrink-image.ps1
|
||||
BIN
LICENSE.md
Normal file
BIN
LICENSE.md
Normal file
Binary file not shown.
16
shrink-image.ps1
Normal file
16
shrink-image.ps1
Normal 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:
|
||||
Reference in New Issue
Block a user