mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-04 07:48:44 +00:00
Merge pull request #7374 from cpuguy83/revert_rm_f_deprecation
Revert --stop/--kill and use SIGKILL instead
This commit is contained in:
@@ -6,9 +6,8 @@ docker-rm - Remove one or more containers
|
||||
|
||||
# SYNOPSIS
|
||||
**docker rm**
|
||||
[**-k**|**--kill**[=*false*]]
|
||||
[**-l**|**--link**[=*false*]]
|
||||
[**-s**|**--stop**[=*false*]]
|
||||
[**-f**|**--force**[=*false*]]
|
||||
[**-v**|**--volumes**[=*false*]]
|
||||
CONTAINER [CONTAINER...]
|
||||
|
||||
@@ -20,15 +19,11 @@ remove a running container unless you use the \fB-f\fR option. To see all
|
||||
containers on a host use the **docker ps -a** command.
|
||||
|
||||
# OPTIONS
|
||||
**-k**, **--kill**=*true*|*false*
|
||||
Kill and remove a running container. The default is *false*.
|
||||
|
||||
**-l**, **--link**=*true*|*false*
|
||||
Remove the specified link and not the underlying container. The default is *false*.
|
||||
|
||||
**-s**, **--stop**=*true*|*false*
|
||||
Stop and remove a running container. The default is *false*.
|
||||
|
||||
**-f**, **--force**=*true*|*false*
|
||||
Allows removing of a running container by first killing it with SIGKILL.
|
||||
**-v**, **--volumes**=*true*|*false*
|
||||
Remove the volumes associated with the container. The default is *false*.
|
||||
|
||||
|
||||
@@ -37,11 +37,7 @@ You can still call an old version of the API using
|
||||
`DELETE /containers/(id)`
|
||||
|
||||
**New!**
|
||||
You can now use the `stop` parameter to stop running containers before removal
|
||||
(replace `force`).
|
||||
|
||||
**New!**
|
||||
You can now use the `kill` parameter to kill running containers before removal.
|
||||
When using `force`, the container will be immediately killed with SIGKILL.
|
||||
|
||||
`POST /containers/(id)/start`
|
||||
|
||||
|
||||
@@ -679,9 +679,7 @@ Remove the container `id` from the filesystem
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
- **stop** – 1/True/true or 0/False/false, Stop then remove the container.
|
||||
Default false
|
||||
- **kill** - 1/True/true or 0/False/false, Kill then remove the container.
|
||||
- **force** - 1/True/true or 0/False/false, Kill then remove the container.
|
||||
Default false
|
||||
|
||||
Status Codes:
|
||||
|
||||
@@ -864,8 +864,7 @@ registry or to a self-hosted one.
|
||||
|
||||
Remove one or more containers
|
||||
|
||||
-s, --stop=false Stop and remove a running container
|
||||
-k, --kill=false Kill and remove a running container
|
||||
-f, --force=false Force removal of a running container. Uses SIGKILL to stop the container.
|
||||
-l, --link=false Remove the specified link and not the underlying container
|
||||
-v, --volumes=false Remove the volumes associated with the container
|
||||
|
||||
@@ -890,21 +889,12 @@ This will remove the underlying link between `/webapp`
|
||||
and the `/redis` containers removing all
|
||||
network communication.
|
||||
|
||||
$ sudo docker rm --stop redis
|
||||
redis
|
||||
|
||||
The main process inside the container referenced under the link `/redis` will receive
|
||||
SIGTERM, and after a grace period, SIGKILL, then the container will be removed.
|
||||
|
||||
$ sudo docker rm --kill redis
|
||||
$ sudo docker rm --force redis
|
||||
redis
|
||||
|
||||
The main process inside the container referenced under the link `/redis` will receive
|
||||
SIGKILL, then the container will be removed.
|
||||
|
||||
NOTE: If you try to use `stop` and `kill` simultaneously, Docker will return an error.
|
||||
|
||||
$ sudo docker rm $(docker ps -a -q)
|
||||
|
||||
This command will delete all stopped containers. The command
|
||||
`docker ps -a -q` will return all existing container
|
||||
|
||||
Reference in New Issue
Block a user