After some research I found out that it is not possible to access the Docker daemon of the underlying instance in a managed CodeBuild environment. This would require a custom EC2 instance. As I don't want to pay the cost for that I decided to go with the Docker-in-Docker approach instead.