How to Mount Docker.sock in EKS Fargate?

6/9/2021

I'm trying to build docker images inside EKS fargate from kubernetes jenkins plugin. As to build docker images, docker daemon requires docker.sock from the host volume. How to mount the docker.sock inside EKS fargate. I m using custom docker image in container template which has all the docker and other utilities installed

PS: Tried mounting EFS inside the EC2 machine(/efs) and copied the docker.sock from /var/run/docker.sock to /efs. And during the container startup, mounted the docker.sock , but still the docker build or docker related commands are not working.

Can some one help me with the approach?

-- Sriram Raghavan
amazon-eks
aws-fargate
kubernetes

1 Answer

6/9/2021

Fargate has migrated to containerd and doesn't use the Docker runtime anymore. So beyond security considerations, this is not possible. Check this out to see if it's a viable option for you.

-- mreferre
Source: StackOverflow