Docker Cookbook: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
</syntaxhighlight>
</syntaxhighlight>


== Stopping containers ==
== Removing containers ==


Stop all containers
Stop all containers


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
$ docker stop
$ docker rm [ID_OR_NAME]
</syntaxhighlight>
 
Stop a specific container by id
 
<syntaxhighlight lang="bash">
$ docker stop [CONTAINER_ID]
</syntaxhighlight>
</syntaxhighlight>



Revision as of 04:33, 22 May 2018

View all running containers

$ docker ps

Removing containers

Stop all containers

$ docker rm [ID_OR_NAME]

Managing images

List all images: [1]

$ docker images

Viewing files in a container

$ docker exec -t -i mycontainer /bin/bash

Exit the connection and return to the regular local filesystem command prompt with exit.

See also