In the azure build pipeline, how to cleanup the docker images (created as part of the pipeline) from self hosted agent once it is pushed?

血红的双手。 提交于 2020-05-17 06:22:30

问题


I am using self hosted agent to run my build pipeline. The agent machine has got the base docker image downloaded. The pipeline builds and pushes a new docker image (based on top of the base image) using the 1st task as shown in the following screenshot.

Once the image is built and pushed to the container registry, I wish to clean up the images (created as part of this pipeline) from the self hosted agent to avoid disk space issues in the future (the base image should remain). Is there a Docker task to cleanup/remove the built image? In the azure build pipeline, how to cleanup the docker image from self hosted agent once it is pushed?

来源:https://stackoverflow.com/questions/61606043/in-the-azure-build-pipeline-how-to-cleanup-the-docker-images-created-as-part-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!