ansible-community / molecule-plugins

Collection on molecule plugins
MIT License
101 stars 67 forks source link

docker: support cache_from in create playbook #252

Closed rmuir closed 3 weeks ago

rmuir commented 2 months ago

Support plumbing cache_from parameter in create.yml playbook.

This parameter is very useful for external CI/CD caches, especially where there is no persistence between runs as described in https://docs.docker.com/build/cache/backends/

Molecule works great in my environment, but spends a long time rebuilding images in community.docker.docker_image:

===============================================================================
Build an Ansible compatible image (new) -------------------------------- 87.64s

I'd like to pass cache_from rather than fork the create.yml playbook, to make molecule tests faster for CI/CD servers and our developers: we do this already for adhoc docker-compose + ansible based tests. Thank you!