github.com/hashicorp/packer@v1.14.3/examples/hcl/linux/build.alpine.pkr.hcl (about)

     1  
     2  build {
     3    name = "alpine"
     4    description = <<EOF
     5  This build creates alpine images for versions :
     6  * v3.12
     7  For the following builders :
     8  * virtualbox-iso
     9  EOF
    10  
    11    // the common fields of the source blocks are defined in the
    12    // source.builder-type.pkr.hcl files, here we only set the fields specific to
    13    // the different versions of ubuntu.
    14    source "source.virtualbox-iso.base-alpine-amd64" {
    15      name                    = "3.12"
    16      iso_url                 = local.iso_url_alpine_312
    17      iso_checksum            = "file:${local.iso_checksum_url_alpine_312}"
    18      output_directory        = "virtualbox_iso_alpine_312_amd64"
    19      boot_command            = local.alpine_312_floppy_boot_command
    20      boot_wait               = "10s"
    21    }
    22  
    23    source "source.vsphere-iso.base-alpine-amd64" {
    24      name                    = "3.12"
    25      vm_name                 = "alpine-3.12"
    26      iso_url                 = local.iso_url_alpine_312
    27      iso_checksum            = "file:${local.iso_checksum_url_alpine_312}"
    28      boot_command            = local.alpine_312_floppy_boot_command_vsphere
    29      boot_wait               = "10s"
    30    }
    31  
    32    source "source.vmware-iso.esxi-base-alpine-amd64" {
    33      name                    = "3.12-from-esxi"
    34      iso_url                 = local.iso_url_alpine_312
    35      iso_checksum            = "file:${local.iso_checksum_url_alpine_312}"
    36      boot_command            = local.alpine_312_floppy_boot_command_vsphere
    37    }
    38  
    39    provisioner "shell" {
    40      inline = ["echo hi"]
    41    }
    42  }