Build repeatable machine images with Packer
8 steps · about 1 h 23 min · Intermediate
- Install the Packer CLI (guide, HashiCorp, 5 min)
Gets the build tool ready on your machine.
- Build your first image from an HCL template (tutorial, HashiCorp, 12 min)
Shows sources, builds and the init-validate-build cycle.
- Provision the image with shell steps (tutorial, HashiCorp, 10 min)
Bakes packages and config into the image at build time.
- Parameterise templates with variables (tutorial, HashiCorp, 10 min)
Lets one template build for several environments.
- Build several images in parallel (tutorial, HashiCorp, 8 min)
Shows how one run produces images for multiple targets.
- Tag and push images with post-processors (tutorial, HashiCorp, 8 min)
Finishes the pipeline by publishing the result.
- Build an Amazon Machine Image (tutorial, HashiCorp, 15 min)
Applies the same workflow to a real cloud image.
- Look up HCL template blocks and functions (reference, HashiCorp, 15 min)
Is the reference once you move past the tutorials.