and thank you in advance for your precious time.
I spent my whole day figuring out what is wrong with my configuration. For all I could gather, here is the issue I am facing.
I Operate on MacOS Catalina 10.15.4, 2.6 GHz 6-Core Intel Core i7.
I used to run the command docker image build -t myContainer . to build my container, and followed by docker run -p 5000:5000 myContainer to run my container.
It used to run flawlessly, until I opened the Docker Desktop, and deleted my containers from there. I suspect, the moment I did that, I was able to execute the docker run command, followed by the following error.
Error: Could not find certificate cert.pem
Though, I was able to build my containers successfully.
The step I took to try to tackle with this problem are as follows, but didn't work. These might be helpful to understand the issue more clearly.
I tried to regenerate the certificates for my default machine using
docker-machine regenerate-certs defaultfollowed byeval $(docker-machine env default). Although it did regenerate my certificates, but still could not solve the error while running thedocker run -p 5000:5000 myContainercommand.I restarted my docker machine using
docker-machine restart default, still didn't helpI deleted the default machine using
docker-machine rm default, and then again created the default machine using `docker-machine create -d virtualbox default'I deleted and cleaned docker from my system using
brew cask uninstall dockerand then downloaded the docker.dmg from the website. I restarted my laptop, and started building by container again. build was successful as usual, but it still threw theError: Could not find certificate cert.pemI did ssh into default docker machine created symlink for cert.pem from
/User/manjot/.docker/machone/machines/default/cert.pemto/var/lib/boot2docker/cert.pemconsidering the docker was missing the cert.pem in that folder. But still it did not solve the issue.I also tried to clear the DOCKER_* variables from my environment, and reset them as per the default container using
eval $(docker-machine env default).
I also override the certificates adding following to daemon.json
{
"insecure-registries" : ["myregistrydomain.com:5000"]
}
I could not figure out that Where is the docker trying to find the path to the cert.pem?
I also tried to run these commands as sudo. I also removed the containers and default docker machine from user manjotsingh and created a docker using root. But still it did not work