Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Bob Tanner
packer-windows
Commits
c61948b0
Commit
c61948b0
authored
Sep 22, 2015
by
Stefan Scherer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up docker installation
parent
c08b90e1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
19 deletions
+47
-19
http/.gitignore
http/.gitignore
+1
-0
http/README.md
http/README.md
+25
-0
scripts/install-containers.bat
scripts/install-containers.bat
+7
-0
scripts/install-docker.bat
scripts/install-docker.bat
+13
-5
scripts/restart-helper.bat
scripts/restart-helper.bat
+0
-2
windows_2016.json
windows_2016.json
+1
-12
No files found.
http/.gitignore
0 → 100644
View file @
c61948b0
ContainerOSImage
http/README.md
0 → 100644
View file @
c61948b0
# 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
```
scripts/install-containers.bat
View file @
c61948b0
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
scripts/install-docker.bat
View file @
c61948b0
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
http
s
://
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
scripts/restart-helper.bat
deleted
100644 → 0
View file @
c08b90e1
echo
=======
Sleeping
while
restart
========
ping
127
.0.0.1
-n
30
>
nul
windows_2016.json
View file @
c61948b0
...
...
@@ -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"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment