Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
Clone or download
Latest commit c0d5899 Nov 14, 2018
Failed to load latest commit information.
.github Miscellaneous doc improvements Oct 18, 2018
builder Merge pull request #6962 from hashicorp/fix_6940 Nov 13, 2018
command Merge pull request #6871 from LKaemmerling/master Oct 18, 2018
common fix variable casing convention Oct 22, 2018
communicator Add more detail for errors where the problem is that TEMPDIR is fille… Nov 8, 2018
contrib Try to make help more consistent Oct 11, 2018
examples add options for system disk properties Oct 30, 2018
fix Revert "Rename attribute api_access_key to organization_id" Nov 9, 2018
helper communicator/ssh: proper error message Nov 8, 2018
packer more explicit message Nov 9, 2018
plugin/example delete unneeded plugin file Sep 28, 2017
post-processor Merge pull request #6927 from hashicorp/rebased_4591 Nov 6, 2018
provisioner Fix powershell provisioner tests Nov 9, 2018
scripts scripts: add gcc package for using gco on build Oct 31, 2018
template Formatting Nov 5, 2018
test Miscellaneous doc improvements Oct 18, 2018
vendor Added a sed function. Not quite working yet Nov 5, 2018
version prepare for next version Oct 29, 2018
website Merge pull request #6997 from lunchbag/jen/update-share-img Nov 14, 2018
.gitattributes too many files for shell during Make, convert .go and .sh to EOL=lf Apr 7, 2018
.gitignore switch to netlify deployment Sep 19, 2018
.travis.yml travis-ci: allow failures on windows Oct 17, 2018 set release version to today Oct 29, 2018
CODEOWNERS Update Scaleway code owners Oct 26, 2018
Dockerfile dockerfile: add minimal image with provisioners support Oct 31, 2018
Makefile Makefile: make find work on windows using `-executable` instead of `-… Oct 16, 2018 Miscellaneous doc improvements Oct 18, 2018
Vagrantfile vagrantfile: add support for docker provider Oct 31, 2018
appveyor.yml revert appveyor skips as windows builds are pretty unstable Oct 17, 2018
checkpoint.go move packer to hashicorp Apr 4, 2017
commands.go Complete Atlas deprecation. Aug 3, 2018
config.go move packer to hashicorp Apr 4, 2017
go.mod go mod init Nov 12, 2018
go.sum go mod init Nov 12, 2018
log.go Use Sprint() instead of Sprintf() in log dedupe Oct 10, 2018
main.go document wrapConfig a little Sep 24, 2018
main_test.go move packer to hashicorp Apr 4, 2017
panic.go Add telemetry reporting through checkpoint Jun 15, 2017
stdin.go Gracefully clean up on SIGTERM Sep 8, 2017


Build Status Windows Build Status GoDoc GoReportCard

Packer is a tool for building identical machine images for multiple platforms from a single source configuration.

Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer comes out of the box with support for many platforms, the full list of which can be found at

Support for other platforms can be added via plugins.

The images that Packer creates can easily be turned into Vagrant boxes.

Quick Start

Note: There is a great introduction and getting started guide for those with a bit more patience. Otherwise, the quick start below will get you up and running quickly, at the sacrifice of not explaining some key points.

First, download a pre-built Packer binary for your operating system or compile Packer yourself.

After Packer is installed, create your first template, which tells Packer what platforms to build images for and how you want to build them. In our case, we'll create a simple AMI that has Redis pre-installed. Save this file as quick-start.json. Export your AWS credentials as the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.

  "variables": {
    "access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
    "secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}"
  "builders": [{
    "type": "amazon-ebs",
    "access_key": "{{user `access_key`}}",
    "secret_key": "{{user `secret_key`}}",
    "region": "us-east-1",
    "source_ami": "ami-af22d9b9",
    "instance_type": "t2.micro",
    "ssh_username": "ubuntu",
    "ami_name": "packer-example {{timestamp}}"

Next, tell Packer to build the image:

$ packer build quick-start.json

Packer will build an AMI according to the "quick-start" template. The AMI will be available in your AWS account. To delete the AMI, you must manually delete it using the AWS console. Packer builds your images, it does not manage their lifecycle. Where they go, how they're run, etc., is up to you.


Comprehensive documentation is viewable on the Packer website:

Developing Packer

See for best practices and instructions on setting up your development environment to work on Packer.