forked from p15670423/monkey
Build: Cleanup dangling docker images after build
This commit is contained in:
parent
cdbe929a87
commit
b8c4ae8e0c
|
@ -57,6 +57,8 @@ build_package() {
|
|||
|
||||
move_package_to_dist_dir $tgz_name $dist_dir
|
||||
|
||||
clean_stale_images "$docker_image_name"
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
|
@ -75,3 +77,10 @@ build_docker_image_tgz() {
|
|||
move_package_to_dist_dir() {
|
||||
mv "$1" "$2/"
|
||||
}
|
||||
|
||||
clean_stale_images() {
|
||||
echo "Cleaning images"
|
||||
|
||||
sudo docker rmi $1
|
||||
sudo docker image prune --force
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue