windows_2016_docker_azure.json 1.93 KB
Newer Older
1 2
{
 "variables": {
3
    "headless": "false",
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
    "azure_ad_tenant_id": "{{env `PACKER_AZURE_AD_TENANT_ID`}}",
    "azure_subscription_id": "{{env `PACKER_AZURE_SUBSCRIPTION_ID`}}",
    "object_id": "{{env `PACKER_AZURE_OBJECT_ID`}}",
    "app_id": "{{env `PACKER_AZURE_APP_ID`}}",
    "client_secret": "{{env `PACKER_AZURE_CLIENT_SECRET`}}",
    "resource_group": "{{env `PACKER_AZURE_RESOURCE_GROUP`}}",
    "storage_account": "{{env `PACKER_AZURE_STORAGE_ACCOUNT`}}"
  },
  "builders": [
    {
      "type": "azure-arm",
      "subscription_id": "{{user `azure_subscription_id`}}",
      "tenant_id": "{{user `azure_ad_tenant_id`}}",
      "object_id": "{{user `object_id`}}",
      "client_id": "{{user `app_id`}}",
      "client_secret": "{{user `client_secret`}}",
      "resource_group_name": "{{user `resource_group`}}",

      "cloud_environment_name": "Public",
Stefan Scherer's avatar
Stefan Scherer committed
23 24
      "location": "West Europe",
      "vm_size": "Standard_D2_v2",
25 26 27

      "storage_account": "{{user `storage_account`}}",
      "capture_container_name": "images",
Stefan Scherer's avatar
Stefan Scherer committed
28
      "capture_name_prefix": "WindowsServer2016Docker",
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

      "os_type": "Windows",
      "image_publisher": "MicrosoftWindowsServer",
      "image_offer": "WindowsServer",
      "image_sku": "2016-Datacenter",
      "image_version": "latest",

      "communicator": "winrm",
      "winrm_use_ssl": "true",
      "winrm_insecure": "true",
      "winrm_timeout": "3m",
      "winrm_username": "packer"
    }
  ],
  "provisioners": [
    {
      "type": "powershell",
46
      "scripts": [
Stefan Scherer's avatar
Stefan Scherer committed
47
        "./scripts/docker/2016/install-containers-feature.ps1"
48 49
      ]
    },
50 51 52
    {
      "type": "windows-restart"
    },
53 54 55 56
    {
      "type": "powershell",
      "scripts": [
        "./scripts/docker/add-docker-group.ps1",
57
        "./scripts/docker/disable-windows-defender.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
58
        "./scripts/docker/2016/install-docker.ps1",
59
        "./scripts/docker/docker-pull-async.ps1",
60
        "./scripts/docker/remove-docker-key-json.ps1"
61 62 63 64
      ]
    }
  ]
}