Docker Artifact caching MVC
Caching Docker containers and layers between stages and builds is a nice feature that can offer a lot of speed up in common build and deploy scenarios. We can provide customer-dedicated Docker caches on .com or private installations to accelerate build performance in a secure way at the premium tier.
I'm looking to reuse docker containers between build stages. As it stands I'm using docker-compose to build my environment, and then I have a container in which I need to run various test suits. I'd like to build the container in one stages and then use this container in the other stages.
buildstage would build the container, and then this would be cached for use in all stages related to this commit
teststage would use the container built in the previous stage. This would allow me to run the container multiple times in parallel to speed up tests times.
- Once all builds are finished this cache could be thrown away, either by manually doing this in a third stage, or automatically by the runner.
This leads me to a couple of questions.
1) Is it possible to share a container build between stages? 2) If not, is this on the roadmap at all?
If it makes any difference at all, I am using the docker in docker configuration for my runner.