Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

change docker image build path #51

Merged
merged 6 commits into from
May 16, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions molecule_docker/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Docker(Driver):
image: image_name:tag
dockerfile: Dockerfile.j2
pull: True|False
path: /path/to_docker/build/context
pre_build_image: True|False
registry:
url: registry.example.com
Expand Down
4 changes: 2 additions & 2 deletions molecule_docker/playbooks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{%- else -%}
{{ playbook_dir + '/Dockerfile.j2' }}
{%- endif -%}
dest: "{{ molecule_ephemeral_directory }}/Dockerfile_{{ item.image | regex_replace('[^a-zA-Z0-9_]', '_') }}"
dest: "{{ item.path | default(molecule_scenario_directory) }}/Dockerfile_{{ item.image | regex_replace('[^a-zA-Z0-9_]', '_') }}"
mode: "0600"
loop: "{{ molecule_yml.platforms }}"
loop_control:
Expand All @@ -67,7 +67,7 @@
- not item.item.pre_build_image | default(false)
docker_image:
build:
path: "{{ molecule_ephemeral_directory }}"
path: "{{ item.item.path | default(molecule_scenario_directory) }}"
dockerfile: "{{ item.invocation.module_args.dest }}"
pull: "{{ item.item.pull | default(true) }}"
network: "{{ item.item.network_mode | default(omit) }}"
Expand Down