I want to build a docker image from a Dockerfile, and publish this image to an AWS ECR (Docker registry).
In order to succeed, I need to have access to docker build and docker push from within the Codebuild container, which is problematic (installing docker inside a docker container causes errors such as Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?).
How would one proceed to do such a thing please? Is there any way to use codebuild to build Docker images from a Dockerfile ?