I normally prefer to manage my apps on my OSX with brew
I am able to install docker, docker-compose and docker-machine
docker --version
Docker versio
On a supported Mac, run:
brew cask install docker
Then launch the Docker app. Click next. It will ask for privileged access. Confirm. A whale icon should appear in the top bar. Click it and wait for "Docker is running" to appear.
You should be able to run docker
commands now:
docker ps
Because docker is a system-level package, you cannot install it using brew install
, and must use the cask instead.
Note: This solution only works for Macs whose CPUs support virtualization, which may not include old Macs.
I had docker up to date, docker said it was running, and the diagnosis was good. I needed to unset some legacy environment variable (thanks https://docs.docker.com/docker-for-mac/troubleshoot/#workarounds-for-common-problems )
unset DOCKER_HOST
unset DOCKER_CERT_PATH
unset DOCKER_TLS_VERIFY
I have Mac OS and I open Launchpad
and select docker
application.
from reset
tab click on restart
.
Try this to create default.
docker-machine create default
Install minikube and come join the dark side.
https://kubernetes.io/docs/tasks/tools/install-minikube/
$ bash --version
GNU bash, version 5.0.3(1)-release (x86_64-apple-darwin18.2.0)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
eval $(minikube docker-env)
$ docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli generate -i /local/swagger.json -l python -o /local/test/
[main] INFO io.swagger.parser.Swagger20Parser - reading from /local/swagger.json
[main] WARN io.swagger.codegen.DefaultGenerator - 'host' not defined in the spec. Default to 'localhost'.
Works great on Macbook Pro 2018 with bash v5. No need to install all the other docker nonsense these days IMO. The VM and install script that comes with minikube can replace docker machine from my experience.
I was facing similar issue on my mac, and I found that docker wasn't running in my machine, I just went to applications and invoked whale and then it worked .