Customizing Packer with plugins
The built-in provisioners that we used are pretty powerful. By providing shell access and file uploads, it is possible to do almost everything inside a Packer provisioner.
For large builds, this can be quite tedious. And, if the case is something common, you might want to simply have your own Go application do the work for you.
Packer allows for building plugins that can be used as the following:
- A Packer builder
- A Packer provisioner
- A Packer post-processor
Builders are used when you need to interact with the system that will use your image: Docker, AWS, GCP, Azure, or others. As this isn't a common use outside cloud providers or companies such as VMware adding support, we will not cover this.
Post-processors are normally used to push an image to upload the artifacts generated earlier. As this isn't common, we will not cover this.
Provisioners are the most common, as they are part of the build process to output...