Skip to content

Commit

Permalink
Remove untagged docker images before exiting build_image()
Browse files Browse the repository at this point in the history
  • Loading branch information
edannenberg committed Feb 3, 2019
1 parent 5731bd6 commit dfb24ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions engine/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ function build_image() {
_status_msg="tag image ${image_id}:latest"
pwrap 'nolog' "${DOCKER}" tag "${image_id}:${IMAGE_TAG}" "${image_id}:latest" || die "${_status_msg}"

_status_msg="remove untagged images"
pwrap "${DOCKER}" image prune -f

add_documentation_header "${image_id}" "${image_type}" || die "Failed to generate PACKAGES.md for ${image_id}"
local has_tests done_text
[[ -n "${POST_BUILD_HC}" || -f "${image_path}/build-test.sh" ]] && has_tests='true'
Expand Down

0 comments on commit dfb24ac

Please sign in to comment.