Commit c61948b0 authored by Stefan Scherer's avatar Stefan Scherer

Clean up docker installation

parent c08b90e1
ContainerOSImage
# http cache
Packer is able to start an HTTP server, but the variables for IP and port are only available while running the boot command.
So we have to run another HTTP server.
This http cache directory is used to speed up the installation of the https://aka.ms/ContainerOSImage
## Build the cache
```
$ curl -L -o ContainerOSImage https://aka.ms/ContainerOSImage
```
## Run the http cache server
```
$ python -m SimpleHTTPServer 8000
```
## Build the packer box
```
$ cd ..
$ packer build --only=vmware-iso windows_2016.json
```
powershell.exe -Command "Install-WindowsFeature -Name Containers"
shutdown /r /t 5 /f /d p:4:1 /c "Reboot for Containters"
net stop winrm
net stop OpenSSHd
echo Sleeping while restart in progress
ping 127.0.0.1 -n 60 > nul
rem https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/inplace_setup
powershell.exe -Command "wget -uri http://aka.ms/setupcontainers -OutFile C:\ContainerSetup.ps1"
powershell.exe -File "C:\ContainerSetup.ps1"
rem https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/manage_docker
set WIMPATH=http://192.168.254.1:8000/ContainerOSImage
echo ======= PAUSE ========
ping 127.0.0.1 -n 3600 > nul
if "%WIMPATH%x"=="x" (
powershell.exe -File "C:\ContainerSetup.ps1"
) else (
powershell.exe -Command "wget -uri %WIMPATH% -OutFile C:\ContainerOSImage"
if exist C:\ContainerOSImage (
powershell.exe -File "C:\ContainerSetup.ps1" -WimPath C:\ContainerOSImage
) else (
powershell.exe -File "C:\ContainerSetup.ps1"
)
del C:\ContainerOSImage
)
echo ======= PAUSE DONE ===
rem https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/manage_docker
echo ======= Sleeping while restart ========
ping 127.0.0.1 -n 30 > nul
......@@ -75,18 +75,7 @@
"./scripts/vm-guest-tools.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat",
"./scripts/install-containers.bat"
]
},
{
"type": "windows-restart"
},
{
"type": "shell",
"remote_path": "/tmp/script.bat",
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
"scripts": [
"./scripts/restart-helper.bat",
"./scripts/install-containers.bat",
"./scripts/install-docker.bat",
"./scripts/disable-auto-logon.bat"
]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment