Common Docker commands
The following common Docker commands may be helpful as you create containers and specify images.
Command | Description |
---|---|
docker images |
Lists all the available Docker images. |
docker --ps all
|
Lists all the available Docker containers. |
|
Start, stop, or restart containers. |
docker rm <container>
|
Removes the container. Before removing a container, the container should be stopped. |
docker rmi <image>
|
Removes the Docker image. Before removing the image, all the associated containers should be removed. |
|
Get into a running container. |
|
Copy files to and from a container. |
|
Retrieves generated console messages from the container. |
Note: See the Docker documentation for a detailed discussion of these and
additional commands.