forked from StefanScherer/packer-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
windows_10_docker.json
78 lines (77 loc) · 2.12 KB
/
windows_10_docker.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"builders": [
{
"boot_command": "",
"boot_wait": "5s",
"communicator": "winrm",
"headless": false,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"source_path": "{{user `source_path`}}",
"type": "vmware-vmx",
"vm_name": "windows_10_docker",
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
"memsize": "2048",
"numvcpus": "2",
"scsi0.virtualDev": "lsisas1068"
},
"vmx_remove_ethernet_interfaces": true,
"vnc_port_max": 5980,
"vnc_port_min": 5900,
"winrm_password": "vagrant",
"winrm_timeout": "15m",
"winrm_username": "vagrant"
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "windows_10_docker_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_10.template"
}
],
"provisioners": [
{
"scripts": [
"./scripts/docker/10/install-containers-feature.ps1"
],
"type": "powershell"
},
{
"type": "windows-restart"
},
{
"environment_vars": [
"docker_images={{user `docker_images`}}",
"docker_provider={{user `docker_provider`}}",
"docker_version={{user `docker_version`}}"
],
"scripts": [
"./scripts/docker/add-docker-group.ps1",
"./scripts/docker/install-docker.ps1",
"./scripts/docker/docker-pull.ps1",
"./scripts/docker/open-docker-insecure-port.ps1",
"./scripts/docker/open-docker-swarm-ports.ps1",
"./scripts/docker/remove-docker-key-json.ps1",
"./scripts/docker/disable-windows-defender.ps1"
],
"type": "powershell"
},
{
"scripts": [
"./scripts/uac-enable.bat",
"./scripts/set-winrm-automatic.bat",
"./scripts/compact.bat"
],
"type": "windows-shell"
}
],
"variables": {
"docker_images": "microsoft/windowsservercore microsoft/nanoserver",
"docker_provider": "ce",
"docker_version": "17.10.0",
"source_path": "path-to.vmx"
}
}