I'm trying to run the below code as instructed in the docker-graphite-statsd:
docker run -d\
--name graphite\
--restart=always\
-p 80:80\
-p 2003-2004:2003-2004\
-p 2023-2024:2023-2024\
-p 8125:8125/udp\
-p 8126:8126\
graphiteapp/graphite-statsd
It gives this error:
$ sudo docker run -d --name graphite --restart=always -p 80:80 -p 2003-2004:2003-2004 -p 2023-2024:2023-2024 -p 8125:8125/udp -p 8126:8126 graphiteapp/graphite-statsd
sudo: docker: command not found
This is on a Mac. I tried brew install docker
but it made no difference.
How do I resolve this?
The operating-system independent way to check whether Docker is running is to ask Docker, using the docker info command. You can also use operating system utilities, such as sudo systemctl is-active docker or sudo status docker or sudo service docker status , or checking the service status using Windows utilities.
On MacOS go to the whale in the taskbar > Preferences > Daemon > Advanced, or locate ~/. docker/daemon. json. You can also start the Docker daemon manually and configure it using flags.
Docker engine only runs on Linux. Docker Desktop - Since Docker Engine only runs on Linux, developers who use Windows and macOS for software development cannot run the engine until they spin up a virtual machine (VM) that runs linux.
After installing docker using Homebrew, start the Docker daemon by searching for Docker in the Application folder in Finder and running it.
I had to run the following from terminal after doing the above: docker run -d -p 80:80 docker/getting-started
Now run "docker --version" from terminal and it should give the desired result.
Reference : https://www.cprime.com/resources/blog/docker-on-mac-with-homebrew-a-step-by-step-tutorial/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With