2014-04-16 22:07:55 +04:00
|
|
|
% DOCKER(1) Docker User Manuals
|
2014-07-01 06:58:04 +04:00
|
|
|
% Docker Community
|
|
|
|
% JUNE 2014
|
2014-04-16 22:07:55 +04:00
|
|
|
# NAME
|
2014-07-01 06:58:04 +04:00
|
|
|
docker-rm - Remove one or more containers
|
2014-04-16 22:07:55 +04:00
|
|
|
|
|
|
|
# SYNOPSIS
|
2014-07-01 06:58:04 +04:00
|
|
|
**docker rm**
|
2014-08-07 22:50:59 +04:00
|
|
|
[**-f**|**--force**[=*false*]]
|
2014-08-18 03:31:58 +04:00
|
|
|
[**-l**|**--link**[=*false*]]
|
2014-07-01 06:58:04 +04:00
|
|
|
[**-v**|**--volumes**[=*false*]]
|
2014-11-28 07:21:55 +03:00
|
|
|
CONTAINER [CONTAINER...]
|
2014-04-16 22:07:55 +04:00
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
**docker rm** will remove one or more containers from the host node. The
|
|
|
|
container name or ID can be used. This does not remove images. You cannot
|
2015-07-26 05:18:48 +03:00
|
|
|
remove a running container unless you use the **-f** option. To see all
|
2014-04-16 22:07:55 +04:00
|
|
|
containers on a host use the **docker ps -a** command.
|
|
|
|
|
|
|
|
# OPTIONS
|
2014-10-16 01:14:12 +04:00
|
|
|
**--help**
|
|
|
|
Print usage statement
|
|
|
|
|
2014-08-18 03:31:58 +04:00
|
|
|
**-f**, **--force**=*true*|*false*
|
|
|
|
Force the removal of a running container (uses SIGKILL). The default is *false*.
|
|
|
|
|
2014-04-16 22:07:55 +04:00
|
|
|
**-l**, **--link**=*true*|*false*
|
2014-07-01 06:58:04 +04:00
|
|
|
Remove the specified link and not the underlying container. The default is *false*.
|
2014-04-16 22:07:55 +04:00
|
|
|
|
|
|
|
**-v**, **--volumes**=*true*|*false*
|
2014-07-01 06:58:04 +04:00
|
|
|
Remove the volumes associated with the container. The default is *false*.
|
2014-04-16 22:07:55 +04:00
|
|
|
|
|
|
|
# EXAMPLES
|
|
|
|
|
|
|
|
##Removing a container using its ID##
|
|
|
|
|
|
|
|
To remove a container using its ID, find either from a **docker ps -a**
|
|
|
|
command, or use the ID returned from the **docker run** command, or retrieve
|
2014-04-17 19:36:58 +04:00
|
|
|
it from a file used to store it using the **docker run --cidfile**:
|
2014-04-16 22:07:55 +04:00
|
|
|
|
|
|
|
docker rm abebf7571666
|
|
|
|
|
|
|
|
##Removing a container using the container name##
|
|
|
|
|
|
|
|
The name of the container can be found using the **docker ps -a**
|
|
|
|
command. The use that name as follows:
|
|
|
|
|
|
|
|
docker rm hopeful_morse
|
|
|
|
|
|
|
|
# HISTORY
|
2014-04-17 19:36:58 +04:00
|
|
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
2014-07-02 04:30:25 +04:00
|
|
|
based on docker.com source material and internal work.
|
2014-07-03 05:07:42 +04:00
|
|
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2014-07-23 06:40:10 +04:00
|
|
|
July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2014-08-18 03:31:58 +04:00
|
|
|
August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|