Packer

Packer is a HashiCorp tool for building machine images automatically from a single configuration. The HashiCorp developer documentation defines it as “a tool that lets you create identical machine images for multiple platforms from a single source template.” Instead of configuring a running server by hand or with a long-lived configuration-management agent, Packer bakes the desired software and settings into an image once, so that every instance launched from that image is identical.

The motivation behind Packer is the practice of immutable infrastructure. A “golden” image is produced ahead of time and used to launch servers; when something needs to change, a new image is built and rolled out, rather than mutating servers that are already running. This removes the configuration drift that accumulates when machines are patched and tweaked in place, and it makes deployments faster because the configuration work is already finished before launch.

A single Packer template can target many platforms at once through components called builders. The same source definition can produce, for example, an Amazon EC2 AMI, a VMware image, a VirtualBox image, and a Docker image in parallel, keeping them in sync. Provisioners then install and configure software inside the image during the build, and the result is a ready-to-run artifact rather than instructions to be executed later.

Packer was released in 2013 as one of HashiCorp’s early tools, following Vagrant, and it fit naturally alongside the company’s later infrastructure-as-code tooling: Packer builds the images, and tools such as Terraform provision the infrastructure that runs them. By making image building scriptable, repeatable, and multi-platform, Packer helped make immutable infrastructure a practical default rather than an aspiration.

Sources

Last verified June 8, 2026