hashicorp / hashicorp/packer-plugin-docker
Docker provisioner caching
- Dominant language
- Go
- Stars
- 40
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
_This issue was originally opened by @droopy4096 as hashicorp/packer#9758. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._
#### Description
as per issue hashicorp/packer#1995 packer lacks the ability to use Docker cache (or any cache) for image building
#### Use Case(s)
At the moment I'm refactoring Microsoft Azure Pipeline Agent packer template to build container images (vs VM images) and finding the process to be overly tedious as build itself takes about 30min and with failures happening closer to the end of the build one has to spend extra 30min starting from start instead of recycling what already had been successfully built. There is no way to iterate fast without some sort of caching of all the "good" steps/layers.
#### Potential configuration
potentially having an option `--with-cache=XXX` save hashes for each step as tarballs (or other kind of blobs) under the `XXX` directory, along with the metadata for that step. upon re-run packer should be able to determine existence of cache for each step and use that.
#### Potential References
Contributor guide
Assessment
This issue has not been assessed yet.