Skip to content

Commit c0c85be

Browse files
committed
Revert "Remove changes to image squashing"
This reverts commit d166e63.
1 parent 8688a28 commit c0c85be

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • ansible/roles/squash_image/tasks
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
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 }}"

0 commit comments

Comments
 (0)