Cannot build components on gitpod

I am trying to build the components of the gitpod deployment. I was able to find the components under the components folder in the gitpod repo and using leeway to build them. I am using the gitpod itself for doing this as I could not get some test cases working on my attempt to replicate the dev environment on ubuntu ec2(reference). Facing similar test case failures in terminal tests of the supervisor component.
But when I run leeway build .:docker I am getting the error

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I am using the current dev image( I tried the same with other images but am receiving the same error. Is there any other dev image that is being used to build the components for gitpod?
Can someone please help me out on this?