Docker Cookbook: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
Line 16: Line 16:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
$ docker images
$ docker images -a
</syntaxhighlight>
 
Remove an image:
 
<syntaxhighlight lang="bash">
$ docker rmi [IMAGE_NAME]
</syntaxhighlight>
</syntaxhighlight>



Revision as of 04:38, 22 May 2018

View all running containers

$ docker ps

Removing containers

$ docker rm [ID_OR_NAME]

Managing images

List all images: [1]

$ docker images -a

Remove an image:

$ docker rmi [IMAGE_NAME]

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