forked from StefanScherer/packer-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust Docker installation for Win10 and Win2016
- Loading branch information
1 parent
e88b13e
commit 15ea66b
Showing
11 changed files
with
43 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/bin/bash | ||
#packer build --only=vmware-iso windows_10.json | ||
|
||
# my own license | ||
#packer build --only=vmware-iso --var iso_url=~/packer_cache/Win10_1607_English_x64.iso --var iso_checksum=99fd8082a609997ae97a514dca22becf20420891 --var autounattend=./tmp/10/Autounattend.xml windows_10.json | ||
|
||
# Windows 10 Insider 15002 | ||
# packer build --only=vmware-iso --var iso_url=~/packer_cache/Windows10_InsiderPreview_EnterpriseVL_x64_en-us_15002.iso --var iso_checksum=86fdf5c4061edde17a6aece0590225e6880b39ee --var autounattend=./tmp/10_insider/Autounattend.xml windows_10.json | ||
# Windows 10 Pro own license | ||
#packer build --only=vmware-iso --var iso_url=~/packer_cache/my/Win10_1607_English_x64.iso --var iso_checksum=99fd8082a609997ae97a514dca22becf20420891 --var autounattend=./tmp/10_pro/Autounattend.xml windows_10.json | ||
|
||
# Windows 10 Insider 15025 | ||
packer build --only=vmware-iso --var iso_url=~/packer_cache/Windows10_InsiderPreview_EnterpriseVL_x64_en-us_15025.iso windows_10_insider.json | ||
|
||
# Windows 10 Enterprise MSDN | ||
#packer build --only=vmware-iso --var iso_url=~/packer_cache/msdn/en_windows_10_enterprise_version_1607_updated_jan_2017_x64_dvd_9714415.iso --var iso_checksum=97164DD5C1C933BAEF89A4BDE93D544256134FE4 --var iso_checksum_type=sha1 --var autounattend=./tmp/10/Autounattend.xml windows_10.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/bash | ||
# packer build --only=vmware-iso --var iso_url=~/packer_cache/14393.0.160715-1616.RS1_RELEASE_SERVER_EVAL_X64FRE_EN-US.ISO windows_2016_docker.json | ||
packer build --only=vmware-iso --var iso_url=~/packer_cache/en_windows_server_2016_x64_dvd_9327751.iso --var iso_checksum=91d7b2ebcff099b3557570af7a8a5cd6 --var autounattend=./tmp/2016/Autounattend.xml windows_2016_docker.json | ||
|
||
# MSDN ISO | ||
packer build --only=vmware-iso --var iso_url=~/packer_cache/msdn/en_windows_server_2016_x64_dvd_9718492.iso --var iso_checksum=F185197AF68FAE4F0E06510A4579FC511BA27616 --var iso_checksum_type=sha1 --var autounattend=./tmp/2016_noupdate/Autounattend.xml windows_2016_docker.json |
2 changes: 2 additions & 0 deletions
2
.../install-containers-feature-windows10.ps1 → .../docker/10/install-containers-feature.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# https://msdn.microsoft.com/de-de/virtualization/windowscontainers/quick_start/quick_start_windows_10 | ||
Write-Host "Install Containers feature" | ||
Enable-WindowsOptionalFeature -Online -FeatureName containers -All -NoRestart | ||
Write-Host "Install Hyper-V feature" | ||
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart | ||
sc.exe config winrm start= delayed-auto |
7 changes: 2 additions & 5 deletions
7
scripts/docker/install-docker.ps1 → scripts/docker/10/install-docker.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
Set-ExecutionPolicy Bypass -scope Process | ||
New-Item -Type Directory -Path "$($env:ProgramFiles)\docker" | ||
# wget -outfile $env:TEMP\docker-1.13.1.zip "https://dockermsft.blob.core.windows.net/dockercontainer/docker-1-13-1.zip" | ||
Write-Host "Downloading docker ..." | ||
wget -outfile $env:TEMP\docker-1.13.1.zip "https://get.docker.com/builds/Windows/x86_64/docker-1.13.1.zip" | ||
Expand-Archive -Path $env:TEMP\docker-1.13.1.zip -DestinationPath $env:TEMP -Force | ||
copy $env:TEMP\docker\*.exe $env:ProgramFiles\docker | ||
Remove-Item $env:TEMP\docker-1.13.1.zip | ||
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$($env:ProgramFiles)\docker", [EnvironmentVariableTarget]::Machine) | ||
$env:Path = $env:Path + ";$($env:ProgramFiles)\docker" | ||
Write-Host "Registering docker service ..." | ||
. dockerd --register-service -H npipe:// -H 0.0.0.0:2375 -G docker | ||
|
||
Write-Host "Fix --restart=always for reboot ..." | ||
# see https://github.com/docker/docker/issues/27544 | ||
& sc.exe config Docker depend= LanmanWorkstation | ||
|
||
Start-Service Docker |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Write-Host "Install Containers feature" | ||
Install-WindowsFeature -Name Containers | ||
|
||
if ((GWMI Win32_Processor).VirtualizationFirmwareEnabled[0] -and (GWMI Win32_Processor).SecondLevelAddressTranslationExtensions[0]) { | ||
Write-Host "Install Hyper-V feature" | ||
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools | ||
} else { | ||
Write-Host "Skipping installation of Hyper-V feature" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$ProgressPreference = 'SilentlyContinue' | ||
|
||
Set-ExecutionPolicy Bypass -scope Process | ||
New-Item -Type Directory -Path "$($env:ProgramFiles)\docker" | ||
wget -outfile $env:TEMP\docker-1.13.1.zip "https://dockermsft.blob.core.windows.net/dockercontainer/docker-1-13-1.zip" | ||
Expand-Archive -Path $env:TEMP\docker-1.13.1.zip -DestinationPath $env:TEMP -Force | ||
copy $env:TEMP\docker\*.exe $env:ProgramFiles\docker | ||
Remove-Item $env:TEMP\docker-1.13.1.zip | ||
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$($env:ProgramFiles)\docker", [EnvironmentVariableTarget]::Machine) | ||
$env:Path = $env:Path + ";$($env:ProgramFiles)\docker" | ||
. dockerd --register-service -H npipe:// -H 0.0.0.0:2375 -G docker | ||
Start-Service docker |
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
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
This file was deleted.
Oops, something went wrong.
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
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