hashicorp / hashicorp/packer-plugin-docker

Docker provisioner caching

Open
#19 3 comments 2 reactions 0 assignees View on GitHub
builder/docker enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.