Docker Image Cache

I have a curious question. When I run a pipeline that pulls a docker image is the work done on docker image cached? I know the docker image is cached. I am saving an artifact but have no cache: declared. Is everything FRESH when run the pipeline again?


Chris Edwards

1 Like

Hi @chris.edwards

If you have a pipeline job running on Docker and the previous pipeline stage produced an artifact, then the artifact will be available in your Docker stage.

If you are explicitly caching dependencies in your .gitlab-ci.yml file, the cached paths will also be available to your Docker job.

Otherwise, any work done in a Docker container in a previous stage of the pipeline will be lost when that stage completes.


Perfect! Thanks for the quick reply.