[lxd] first pass at docs

This commit is contained in:
Chris Lundquist 2016-07-01 06:45:48 +00:00 committed by Megan Marsh
parent c79e8ddc8f
commit 05f072929f
1 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,50 @@
---
description: |
The `lxd` Packer builder builds containers for LXD. The builder starts an LXD
container, runs provisioners within this container, then saves the container
as an LXD image.
layout: docs
page_title: LXD Builder
...
# LXD Builder
Type: `lxd`
The `lxd` Packer builder builds containers for LXD. The builder starts an LXD
container, runs provisioners within this container, then saves the container
as an LXD image.
The LXD builder requires a modern linux kernel and the `lxd` package.
This builder does not work with LXC.
## Basic Example
Below is a fully functioning example.
``` {.javascript}
{
"builders": [
{
"type": "lxd",
"name": "lxd-xenial",
"image": "ubuntu-daily:xenial",
"output_image": "ubuntu-xenial"
}
]
}
```
## Configuration Reference
### Required:
- `image` (string) - The source image to use when creating the build container. This can be a (local or remote) image (name or fingerprint). E.G. my-base-image, ubuntu-daily:x, 08fababf6f27...
Note: The builder may appear to pause if required to download a remote image, as they are usually 100-200MB. `/var/log/lxd/lxd.log` will mention starting such downloads.
### Optional:
- `name` (string) - The name of the started container. Defaults to `packer-$PACKER_BUILD_NAME`.
- `output_image` (string) - The name of the output artifact. Defaults to `name`