Docker is a tool for managing containers. Docker uses the resource isolation features of the Linux kernel (such as cgroups and kernel namespaces) and a union-capable file system (such as OverlayFS) to allow containers to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines.

docker Command Line Interface

See all containers

docker ps -a

Get inside container while running

docker exec -it <container_name> /bin/bash

Get inside container while not running

docker run -it <container_name> /bin/bash

Cleanup

For images:

docker image prune # Cleans up dangling images
docker image prune -a # Remove all images without one container associated

For Containers:

docker container prune

For Volumes:

ocker volume prune

Prune everything:

docker system prune

Making Smaller images