Packer
HashiCorp Packer for building automated machine images. Create identical images for multiple platforms from a single config.
45 commands
Browse by Topic
Install Packer (macOS)
Install HashiCorp Packer using Homebrew on macOS
Check Packer version
Verify Packer is installed and display the current version
Initialize Packer template
Initialize a Packer template and download required plugins
Build image
Build image from current directory.
Build specific file
Build from specific template file.
Build with variables
Build with variable overrides.
Build specific source
Build only specific source.
Build with var file
Build using variables file.
Debug build
Build with step-by-step confirmation.
Force build
Force build even if artifacts exist.
Build with timestamp UI
Show timestamps on each output line.
Exclude source
Build all sources except the specified one.
On error ask
Prompt for action on build error.
On error abort
Abort and clean up on build error.
Parallel builds limit
Limit number of parallel builds.
No color output
Build without colored output for CI logs.
Validate template
Validate Packer template syntax.
Validate with vars
Validate with variable values.
Syntax only check
Check syntax without validating config.
Validate with var file
Validate using an external variables file.
Evaluate datasources
Validate and evaluate data source blocks.
Initialize plugins
Download required plugins.
Upgrade plugins
Upgrade plugins to latest versions.
Install specific plugin
Install a specific plugin from the registry.
List installed plugins
List all installed Packer plugins.
Remove plugin
Remove an installed plugin.
Inspect template
Show template variables and sources.
Format templates
Format HCL templates.
Check formatting
Check if templates are formatted.
Interactive console
Open interactive console for testing.
Format with diff
Format and show diff of changes made.
Format recursively
Format templates in all subdirectories.
Show version
Display installed Packer version.
Basic source block
HCL2 source block example.
Build block
HCL2 build block example.
Variable definition
HCL2 variable definition.
Locals block
Define local values for reuse in templates.
Data source
HCL2 data source to look up AMIs.
File provisioner
Upload files to the build instance.
Shell provisioner
Run multiple shell scripts as provisioner.
Ansible provisioner
Run Ansible playbook as provisioner.
Post-processor manifest
Generate build manifest with artifact IDs.
Docker source block
HCL2 Docker source for container images.
Required plugins block
Declare required plugins with version constraints.
PowerShell provisioner
Run PowerShell commands on Windows builds.
Discussion
Loading comments...