I have a repository which needs only a handful of things. I’d like to simply create a Dockerfile in the root and have CircleCI build that Docker image and then use that Docker image for the remaining tasks in the pipeline.
Is there a way to have CircleCI docker build -t naftulikay/myrepo:latest and then use that built image locally for subsequent steps?
I think this is possible already - just make it two projects (i.e. two jobs). The thing that builds your build image and what you do with it are two separate tasks - the first is CI tooling and the second is your project under CI. When building your build image, push it to a private registry, and when doing the rest of your pipeline, pull the image from the private registry.