The docker setup does not work as in a normal Linux machine, on a Mac it is much more complicated. But it can be done!
brew cask install --cask docker virtualbox
brew install docker-machine
docker-machine create --driver virtualbox default
docker-machine restart
eval "$(docker-machine env default)"
# This might throw anTSI connection
error. In that case rundocker-machine regenerate-certs default
- (
docker-machine restart
) # maybe needed docker run hello-world
These steps are based on information given in these two questions: