清理半下载的docker镜像

时间:2017-05-05 12:10:11

标签: docker windows-container

我刚刚安装了Docker for Windows,我正在Windows容器模式下运行。

我下载了这张图片microsoft/mssql-server-windows-express,图片非常大,下载中途中断了。

我应该在哪里查找半下载的图像以及清理它的最佳方法。

docker image --all没有显示任何内容

2 个答案:

答案 0 :(得分:0)

使用 file_upload.setOnClickListener { // Create the file transfer manager var fileTransferInstance:FileTransferManager=FileTransferManager.getInstanceFor(connection) Log.i("id is ",contactPersonJId) // Create the outgoing file transfer fileTransderReceiver=fileTransferInstance.createOutgoingFileTransfer(contactPersonJId+"/Smack") //location of the file locateFile() } fun locateFile(){ var intent:Intent= Intent(applicationContext,LocateImage::class.java ) startActivityForResult(intent,IMAGE_REQUEST) } override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) when(requestCode){ IMAGE_REQUEST -> { when(resultCode){ Activity.RESULT_OK -> { val selectedImagePath=data?.getSerializableExtra(LocateImage.Obj.MEDIA_DATA) as? String Log.v("file path is ",selectedImagePath) if(!selectedImagePath.isNullOrEmpty()){ fileTransderReceiver?.sendFile(File(selectedImagePath),"First file") GetFileResponse().execute(fileTransderReceiver) } } } } } private inner class GetFileResponse : AsyncTask<OutgoingFileTransfer?, String,fileTransfer>() { var progressDialog: ProgressDialog? = null override fun onPreExecute() { progressDialog = ProgressDialog.show(this@chatActivity, null, "Sending File..."); } override fun doInBackground(vararg params: OutgoingFileTransfer?): fileTransfer { while (!params[0]?.isDone!!){ if (params[0]?.status!!.equals(FileTransfer.Status.error)){ println("ERROR!!! " + params[0]?.error); }else{ println(params[0]?.status); println(params[0]?.progress); } } var fileTransferState=fileTransfer("abc") fileTransferState.status=params[0]?.status fileTransferState.exception=params[0]?.exception fileTransferState.error=params[0]?.error return fileTransferState } override fun onPostExecute(result: fileTransfer?) { if(progressDialog!!.isShowing) progressDialog!!.dismiss() Log.v("Status is ",result?.status.toString()) Log.v("Exception is ",result?.exception.toString()) Log.v("Error is ",result?.error.toString()) } } 删除未使用的图片。

https://docs.docker.com/engine/reference/commandline/image_prune/

答案 1 :(得分:0)

您可以使用此命令悬挂图层:

docker rmi $(docker images -q -f dangling=true)