Showing posts with label Docker. Show all posts
Showing posts with label Docker. Show all posts

Saturday, May 11, 2019

Docker Command Cheat Sheet

List docker images on the host
$ docker images
List docker containers that are currently running:
$ docker ps
List Containers
$ docker container ls
Delete an image
$ docker rmi <image id>
$ docker rmi --force <image id> #force delete
Remove all images
$ docker rmi $( docker images -q)
Stop All the containers
$ docker stop $( docker ps -aq)
Remove all containers
$ docker rm $( docker ps -aq)
Log Into an Container
$ docker exec -i -t <container id> sh
Run an Docker Image
$ docker run -i -t <image id>

Docker Documents