From the course: Learning HashiCorp Packer
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
The Packer CLI - Packer Tutorial
From the course: Learning HashiCorp Packer
The Packer CLI
- [Instructor] Packer has a simple command line interface made of only six commands. And we'll take a quick look at some of them in this video. By typing "packer", we can get them to list them all on screen. The command we'll use the most is build. It's the command that runs the Packer image creation workflow that we've talked about in earlier videos. The second most useful command is validate. This performs basic syntax and configuration checks. It's a good idea to validate a template after each change. The inspect command gives a quick overview of a template, which can be useful if you're presented with unfamiliar and long template. It will list out the builders, the provisioners, and any variables needed. Fix is only used when you've upgraded Packer, from previous versions, and it tries to automatically upgrade your templates. Push is a deprecated command, and that will be removed in future versions. And version prints out the Packer version that you're currently running. So I'm…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.