Skip to content

Commit

Permalink
docker: support cache_from in create playbook (#252)
Browse files Browse the repository at this point in the history
docker driver: support cache_from in create playbook
  • Loading branch information
rmuir authored Jun 12, 2024
1 parent a81875e commit 6fe434c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/molecule_plugins/docker/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ class Docker(Driver):
restart_retries: 1
buildargs:
http_proxy: http://proxy.example.com:8080/
cache_from:
- registry.example.com/example/example:main
If specifying the `CMD`_ directive in your ``Dockerfile.j2`` or consuming a
built image which declares a ``CMD`` directive, then you must set
Expand Down
1 change: 1 addition & 0 deletions src/molecule_plugins/docker/playbooks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
network: "{{ item.item.network_mode | default(omit) }}"
args: "{{ item.item.buildargs | default(omit) }}"
platform: "{{ item.item.platform | default(omit) }}"
cache_from: "{{ item.item.cache_from | default(omit) }}"
name: "molecule_local/{{ item.item.image }}"
docker_host: "{{ item.item.docker_host | default(lookup('env', 'DOCKER_HOST') or 'unix://var/run/docker.sock') }}"
cacert_path: "{{ item.cacert_path | default((lookup('env', 'DOCKER_CERT_PATH') + '/ca.pem') if lookup('env', 'DOCKER_CERT_PATH') else omit) }}"
Expand Down

0 comments on commit 6fe434c

Please sign in to comment.