Fix local (non-root) docker build support

This was broken recently in a2229e738a
where the buildah support hard coded the modify command so that
it required a 'sudo' for the docker version.

Docker does not always require root for these commands. Also,
need to look further as to why buildah required this.

Change-Id: Iae231ec8bc8dc2822fc3d6bfab593cff3c599910
This commit is contained in:
Dan Prince 2018-09-06 08:26:14 -04:00
parent 678b93fe30
commit b47b569b3c
1 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@
- name: Modify image
command: "{{ build_commands[container_build_tool] }} --tag {{ target_image | default(source_image) }}{{ modified_append_tag }} --file Dockerfile.modified --network host ./"
become: true
#FIXME: buildah should not required root commands to build an image
become: "{{ true if build_commands[container_build_tool] == 'buildah' else false }}"
args:
chdir: "{{ modify_dir_path }}"