AWS Code Build Error : Cannot connect to docker daemon

Solution 1:

I am answering my own question, so it may help some one who is getting same issue. Solution was pretty straightforward, i need to check the privilaged tab which i didn't notice.

enter image description here

Solution :

  1. From the AWS CodeBuild Console, select the Build Project.
  2. Select the 'Edit' dropdown from the top-right corner, and select the 'Environment' option.
  3. Within the 'Edit Environment' page, select 'Override image'. After this, scroll down to find the 'Privileged' option and select it.
  4. Select 'Update Environment' to ensure that the property is updated.