Debugging
Obviously, with so many steps being automated for you, there are many things that can potentially go wrong. Packer gives you a few different ways to debug issues with your builds.
One of the most useful arguments to use with Packer is the -debug flag. This will force you to manually confirm each step before it takes place. Doing this makes it easy to work out exactly which step in the command is failing, which in turn usually makes it obvious what needs to be changed.
Another useful thing to do is to raise the level of logging output during a Packer command. You can do this by setting the PACKER_LOG variable to true. The easiest way to do this is with PACKER_LOG=1 at the beginning of your Packer command line. This will mean you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access