Docker rm: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 16: Line 16:


Force the removal of a running container (uses SIGKILL).
Force the removal of a running container (uses SIGKILL).
=Remove Exited Containers=
Also see [[Docker_ps#Exited_Containers|docker ps]].

Revision as of 01:04, 31 January 2018

Internal

Overview

docker rm <options> <container-id>

A running container cannot be removed unless -f is used.

Once deleted, a container discards its writable layer so the state maintained there from previous runs is lost. The base image is not modified.

Options

-f, --force

Force the removal of a running container (uses SIGKILL).

Remove Exited Containers

Also see docker ps.