Docker

Much has been said about Docker and what it is good for and so forth. However sometimes you just need help doing stuff. The command line interface is documented at Use the Docker command line | Docker Documentation but some useful examples follow:
docker info - gives basic info on containers and system setup
docker ps - list the currently running docker containers, with returns: Container ID, Image, Command, Created, Status, Ports, Names
docker ps -q - list just the Container ID for the currently running docker containers
docker images - list the locally available images and all their versions
docker image ls - same as "docker images"
docker kill container_id - kill the specified docker container
docker kill --signal=SIGKILL container_id - kill the specified docker container
docker system prune - will remove all stopped containers as well as unused volumes and networks and dangling images

For example, let's say you want to get rid of all the old versions of an image, in which case use this:
docker system prune - remove all stopped containers
docker image prune -a - remove all images not associated with a container
This only works if you have a container running the latest version though.

if you execute the following:
systemctl restart docker.service
Then the Docker service will restart and every running container will be killed.

Installing Docker

Linux

I have a Debian 9 VM running in Virtual Box, on which I followed the instructions at Get Docker CE for Debian | Docker Documentation and got Docker working, with any problems.

Mac

There are multiple ways to install on a Mac, you can use brew or brew cask or download a dmg file. I would recommend using the dmg file or "Docker for Mac" as this will automatically update and is actually an easy install, just follow the instructions at Get started with Docker for Mac | Docker Documentation and enjoy.

Alternatives