-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snap-installed docker: could not read CA certificate ca.pem permission denied #3083
Comments
I believe the problem here is that the docker snap is strictly confined, which means it can't read arbitrary locations on the file system. It can read the home directory, but only non-hidden files, which excludes dot-files, such as the .minikube directory in your example. |
Hi @tvansteenburgh. Yes you are right, snap is being blocked by AppArmor. I was able to resolve this by adding:
docker ps is now happy:
If I did this to best practice though is to be determined, I will try to funnel this to some Ubuntu/Snap folks. For now I will close this. Thanks. |
Hi @brylor, I tried to apply your fix above, and now Apparmor complains to me: Maybe it is where I placed it? or some formatting I am not entering? I am new to this and any insight you could provide would be appreciated. file snippet for context below: Miscellaneous accesses/dev/{,u}random w, |
Hi @brylor, Disregard report above please. I don't really know why, but removing the line and restoring the file to the original state seems to have moved past this issue. Sorry for the report. |
For absolute beginners / googlers like me the line to add is precisely:
Eg in my case:
|
It seems like minikube doesn't work quite well with snap installed docker. If reparsing apparmor still doesn't work, you can follow the steps:
3- Minikube delete and start (from a new terminal!) |
Actually you only need the CLI, not the daemon nor containerd (since minikube provides those). Could even use these static binaries: https://download.docker.com/linux/static/stable/x86_64/ Not that you need to use Installing |
Closing because there isn't much we can do about this situation. The workarounds listed in here are however quite useful. My recommendation is to not use the version of docker installed by snap, or |
docker could not read CA certificate ca.pem permission denied
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG
What happened:
I'm on ubuntu (sid) and using minikube v0.28.2, docker 17.06.2-ce (from snap)
I can start minikube with the kvm2 driver, I run eval $(minikube docker-env), but when I docker ps. I get:
The perms look ok all the way down:
What you expected to happen:
docker to connect to the minikube instance of docker
How to reproduce it (as minimally and precisely as possible):
could not read CA certificate "/home/hero/.minikube/certs/ca.pem": open /home/hero/.minikube/certs/ca.pem: permission denied.
The text was updated successfully, but these errors were encountered: