windows_2016_docker_azure.json 1.96 KB
Newer Older
1 2 3
{
  "builders": [
    {
4 5
      "capture_container_name": "images",
      "capture_name_prefix": "WindowsServer2016Docker",
6 7 8
      "client_id": "{{user `app_id`}}",
      "client_secret": "{{user `client_secret`}}",
      "cloud_environment_name": "Public",
9
      "communicator": "winrm",
10
      "image_offer": "WindowsServer",
11
      "image_publisher": "MicrosoftWindowsServer",
12 13
      "image_sku": "2016-Datacenter",
      "image_version": "latest",
14 15 16 17 18 19 20 21 22
      "location": "West Europe",
      "object_id": "{{user `object_id`}}",
      "os_type": "Windows",
      "resource_group_name": "{{user `resource_group`}}",
      "storage_account": "{{user `storage_account`}}",
      "subscription_id": "{{user `azure_subscription_id`}}",
      "tenant_id": "{{user `azure_ad_tenant_id`}}",
      "type": "azure-arm",
      "vm_size": "Standard_D2_v2",
23 24
      "winrm_insecure": "true",
      "winrm_timeout": "3m",
25
      "winrm_use_ssl": "true",
26 27 28
      "winrm_username": "packer"
    }
  ],
29
  "post-processors": [],
30 31
  "provisioners": [
    {
32
      "scripts": [
Stefan Scherer's avatar
Stefan Scherer committed
33
        "./scripts/docker/2016/install-containers-feature.ps1"
34 35
      ],
      "type": "powershell"
36
    },
37 38 39
    {
      "type": "windows-restart"
    },
40 41 42
    {
      "scripts": [
        "./scripts/docker/add-docker-group.ps1",
43
        "./scripts/docker/disable-windows-defender.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
44
        "./scripts/docker/2016/install-docker.ps1",
45
        "./scripts/docker/docker-pull-async.ps1",
46
        "./scripts/docker/remove-docker-key-json.ps1"
47 48
      ],
      "type": "powershell"
49
    }
50 51 52 53 54 55 56 57 58 59 60
  ],
  "variables": {
    "app_id": "{{env `PACKER_AZURE_APP_ID`}}",
    "azure_ad_tenant_id": "{{env `PACKER_AZURE_AD_TENANT_ID`}}",
    "azure_subscription_id": "{{env `PACKER_AZURE_SUBSCRIPTION_ID`}}",
    "client_secret": "{{env `PACKER_AZURE_CLIENT_SECRET`}}",
    "headless": "false",
    "object_id": "{{env `PACKER_AZURE_OBJECT_ID`}}",
    "resource_group": "{{env `PACKER_AZURE_RESOURCE_GROUP`}}",
    "storage_account": "{{env `PACKER_AZURE_STORAGE_ACCOUNT`}}"
  }
61
}
62