File tree Expand file tree Collapse file tree
ansible/roles/squash_image/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
2+ - name : squash newly created image
3+ become : true
4+ ignore_errors : true # Might already be squashed
5+ shell : docker-squash "{{ unsquahed_image_id.stdout_lines[0] }}" -t "{{ container_image }}:{{ container_tag }}"
6+
27- name : get image id for newly created image
38 become : true
4- shell : docker images -a | grep "{{ container_image }}" --color=never | awk '{print $3}'
9+ shell : docker images -a | grep "{{ container_image }}" | grep "{{ container_tag }}" | awk '{print $3}'
510 register : unsquahed_image_id
611
712- name : squash newly created image
813 become : true
914 ignore_errors : true # Might already be squashed
10- shell : docker-squash "{{ unsquahed_image_id.stdout }}" -t "{{ container_image }}:{{ container_tag }}"
15+ shell : docker-squash "{{ unsquahed_image_id.stdout_lines[0] }}" -t "{{ container_image }}:{{ container_tag }}"
You can’t perform that action at this time.
0 commit comments