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

Commit

Permalink
Add build context for custom images (#149)
Browse files Browse the repository at this point in the history
Add the directory containing the Dockerfile/Corefile as the build
context to podman to allow using COPY/ADD commands using relative paths
to that Dockerfile/Corefile.

Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
  • Loading branch information
adrianlzt and ssbarnea authored Jan 7, 2023
1 parent 85651aa commit 1759ab0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/molecule_podman/playbooks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
-t molecule_local/{{ item.item.image }}
{% if item.item.buildargs is defined %}{% for i, k in item.item.buildargs.items() %}--build-arg={{ i }}={{ k }}{% endfor %}{% endif %}
{% if item.item.pull is defined %}--pull={{ item.item.pull }}{% endif %}
{{ molecule_scenario_directory + '/' + (item.item.dockerfile | default( 'Dockerfile.j2')) | dirname }}
with_items: "{{ platforms.results }}"
loop_control:
label: "{{ item.item.image | default('None specified') }}"
Expand Down

0 comments on commit 1759ab0

Please sign in to comment.