Introduction
Docker.app will complain about incompatible processor, so we will use Docker Machine.
Instalation
Download Docker for Mac (Docker.app). It contains some binaries that are necessary.
brew install virtualbox docker-machine
# Normally, those links are created automatically by running Docker.app,
# but it quits on us too early, so we need to do this manually
ln -s "/Applications/Docker.app/Contents//Resources/bin/docker-compose" /usr/local/bin/docker-compose
ln -s "/Applications/Docker.app/Contents//Resources/bin/docker-credential-desktop" /usr/local/bin/docker-credential-desktop
ln -s "/Applications/Docker.app/Contents//Resources/bin/docker-credential-osxkeychain" /usr/local/bin/docker-credential-osxkeychain
You can also use brew
to install docker
and doccker-compose
and it should work without linking above.
Running
docker-machine create
eval $(docker-machine env)
docker run hello-world
docker-compose up
I don't know why... But sometimes docker-machine get a disk corruption when building large images, even after recreate docker-machine the problem still there.
Soo now i use just a Ubuntu on VirtualBox and connect to him using DOCKER_HOST + ssh
Share the host ssh-key with VM, install docker, put user in docker group and add DOCKER_HOST in bash_profile
echo 'export DOCKER_HOST="ssh://user@host"' >> ~/.bash_profile