-
I am trying to run my application which is working fine for docker but failing on containerd . below is the error Warning FailedMount 9m30s (x178 over 5h55m) kubelet MountVolume.SetUp failed for volume "docker-sock" : hostPath type check failed: /var/run/docker.sock is not a socket file |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
You are trying to run a pod which is trying to mount the Docker engine API socket, most likely because some software inside the container wants to execute Docker commands against the Docker API. First, containerd is not Docker, and therefore you won't be able to mount the Docker API socket because containerd does not provide the Docker API. Second, this practice (mounting the Docker socket) is poor security practice and should be replaced by more secure models of performing whatever activity this container is doing using the Docker API; for one example (of many) see here: https://rules.sonarsource.com/kubernetes/RSPEC-6429/ |
Beta Was this translation helpful? Give feedback.
-
@fuweid Could you please help me on this ! Thank you |
Beta Was this translation helpful? Give feedback.
@darshanh it's unlikely right now. maybe you can try to use nerdctl as docker command. For the docker API, there is no such an alternative