single command to stop and remove docker container

前端 未结 11 1165
失恋的感觉
失恋的感觉 2021-01-30 15:17

Is there any command which can combine the docker stop and docker rm command together ? Each time I want to delete a running container, I need to execu

11条回答
  •  长发绾君心
    2021-01-30 15:49

    To remove all stopped containers docker system prune

    To stop live container, docker stop CONTAINER_ID waits 10 sec and it calls docker kill CONTAINER_ID

    Or with docker kill CONTAINER_ID, you can immediately stop the container

提交回复
热议问题