Agent { dockerfile true } cache and performance

Hi all,
Are docker images cached after been built with agent { dockerfile true } or are they rebuilt for each job?

Thanks

1 Like

If it’s on the same agent it’ll probably be cached.at least that’s how docker build works

1 Like

Hello and welcome to this community @Joshuafr :wave:

The images and layers are cached thanks to the Docker cache.
As long as you don’t change the context (i.e. your Dockerfile) and that you don’t clean your Docker cache outside of Jenkins, your image should stay cached.