github.com/mmcquillan/packer@v1.1.1-0.20171009221028-c85cf0483a5d/website/source/docs/builders/lxd.html.md (about)

     1  ---
     2  description: |
     3      The `lxd` Packer builder builds containers for LXD. The builder starts an LXD
     4      container, runs provisioners within this container, then saves the container
     5      as an LXD image.
     6  layout: docs
     7  page_title: 'LXD - Builders'
     8  sidebar_current: 'docs-builders-lxd'
     9  ...
    10  
    11  # LXD Builder
    12  
    13  Type: `lxd`
    14  
    15  The `lxd` Packer builder builds containers for LXD. The builder starts an LXD
    16  container, runs provisioners within this container, then saves the container
    17  as an LXD image.
    18  
    19  The LXD builder requires a modern linux kernel and the `lxd` package.
    20  This builder does not work with LXC.
    21  
    22  ## Basic Example
    23  
    24  Below is a fully functioning example.
    25  
    26  ``` {.javascript}
    27  {
    28    "builders": [
    29      {
    30        "type": "lxd",
    31        "name": "lxd-xenial",
    32        "image": "ubuntu-daily:xenial",
    33        "output_image": "ubuntu-xenial"
    34      }
    35    ]
    36  }
    37  ```
    38  
    39  ## Configuration Reference
    40  
    41  ### Required:
    42  
    43  -  `image` (string) - The source image to use when creating the build
    44     container. This can be a (local or remote) image (name or fingerprint). E.G.
    45     `my-base-image,` `ubuntu-daily:x,` `08fababf6f27`, ...
    46  
    47      ~> Note: The builder may appear to pause if required to download
    48      a remote image, as they are usually 100-200MB. `/var/log/lxd/lxd.log` will
    49      mention starting such downloads.
    50  
    51  ### Optional:
    52  
    53  -  `name` (string) - The name of the started container. Defaults to
    54     `packer-$PACKER_BUILD_NAME`.
    55  
    56  -  `output_image` (string) - The name of the output artifact. Defaults to
    57     `name`.
    58  
    59  -  `command_wrapper` (string) - lets you prefix all builder commands, such as
    60     with `ssh` for a remote build host. Defaults to `""`.