containerId=$(docker ps -aqf 'name=work-docker')
docker stop $containerId
docker rm $containerId
imageId = $(docker image -q work-docker:tag)
docker rmi $imageId
work-docker 是鏡像名,tag是標(biāo)簽戚长。在centos下執(zhí)行需要加寫校驗(yàn)
containerId=$(docker ps -aqf 'name=work-docker')
docker stop $containerId
docker rm $containerId
imageId = $(docker image -q work-docker:tag)
docker rmi $imageId
work-docker 是鏡像名,tag是標(biāo)簽戚长。在centos下執(zhí)行需要加寫校驗(yàn)