-
Notifications
You must be signed in to change notification settings - Fork 5
/
windows_images.json
72 lines (72 loc) · 2.22 KB
/
windows_images.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
{
"builders": [
{
"type": "googlecompute",
"name": "docker-2019",
"project_id": "{{user `gcp_project_id`}}",
"zone": "us-central1-a",
"source_image_family": "windows-2019-core-for-containers",
"image_name": "windows-docker-builder-{{user `current_date`}}",
"image_family": "windows-docker-builder",
"machine_type": "n1-standard-4",
"disk_type": "pd-ssd",
"disk_size": "200",
"communicator": "winrm",
"winrm_username": "packer_user",
"winrm_insecure": true,
"winrm_use_ssl": true,
"winrm_timeout": "10m",
"state_timeout": "10m",
"metadata": {
"windows-startup-script-cmd": "gcloud auth configure-docker --quiet & winrm quickconfig -quiet & net user /add packer_user & net localgroup administrators packer_user /add & winrm set winrm/config/service/auth @{Basic=\"true\"}"
},
"tags": ["packer"]
}
],
"provisioners": [
{
"type": "windows-shell",
"inline": [
"echo %username%"
]
},
{
"type": "windows-shell",
"inline": [
"powershell -Command \"Set-MpPreference -DisableRealtimeMonitoring 1\""
]
},
{
"type": "windows-shell",
"inline": [
"@\"%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -NoProfile -NoLogo -InputFormat None -ExecutionPolicy Bypass -Command \"iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))\" && SET \"PATH=%PATH%;%ALLUSERSPROFILE%\\chocolatey\\bin\""
]
},
{
"type": "windows-shell",
"inline": [
"net stop docker",
"dockerd --unregister-service",
"dockerd --register-service --storage-opt size=100G",
"net start docker",
"docker version"
]
},
{
"type": "windows-shell",
"inline": [
"choco install -y awscli ruby microsoft-openjdk",
"choco install -y python3 --pre "
]
},
{
"type": "windows-shell",
"inline": [
"docker version",
"docker pull mcr.microsoft.com/windows/servercore:ltsc2019",
"docker pull --all-tags cirrusci/windowsservercore",
"docker pull python:3-windowsservercore"
]
}
]
}