packer1
Tool for creating machine images for multiple platforms
Overview
Packer is a CLI tool for the automatic creation of identical machine images (single deployable units that contain a pre-configured OS and installed software) for multiple platforms (public cloud providers, private cloud and desktop virtualization solutions) from a single JSON template configuration file. For the documentation of Packer, especially on how to write proper Packer templates, please see <https://www.packer.io/docs>.
Commands
- build
-
build image(s) from a template. For a full list of options related to this command, see the output of: $
packerbuild -h.
- fix
-
fix templates from old versions of Packer like this: $
packerfix old.json > new.json. For a full list of fixes which this command performs and special options, see the output of: $packerfix -h.
- inspect
-
print components of a template. This command validates the basic syntax of the template by necessity, but not if the configuration is valid (this is what the command
validateis for).
- validate
-
check if a template is valid. The command returns a zero exit status if a template is valid, and a non-zero exit status if it isn't. If
-syntax-onlyis given as option, only the syntax of the template is checked.
- version
-
print the Packer version
Logging
To get a build log, run packer like this: $ PACKER_LOG=1 packer build foo.json 2>>build.log, or use $PACKER_LOG_PATH.
Environment
For a full list of available environment variables, see <https://www.packer.io/docs/other/environmental-variables.html>.
History
- Debian 12 (Bookworm) to Debian 10 (Buster): the text shown here
- Debian 9 (Stretch)