Build Docker Image For Use In Further Steps

Hi,

It is possible to use the base docker image to then build another image (from a DockerFile) which is then cached and accessible to further steps, without having to push and pull from a remote registry?

So my flow would be…

Using the base circleci docker image, which provides docker commands…

Build: a docker image from DockerFile
Lint: run a command against a new docker container based on build image. Dependency on build.
unit:test: run a command against a new docker container based on build image. Dependency on build.

This is a little different from running docker compose as the first step, which would create the image and run a container based on it.

Regards,

Andrew

Ah I think I may have it, if I docker image save to a folder and then use that folder as cache across the steps I can import it. Sounds like a plan.