I currently use the
docker execution type. Within, I download
docker-compose and my steps looks like this:
docker-compose -f docker-compose.ci.yml run pytests.
Because of the lack of volume mounts I have to do clever tricks to get artifacts out of containers. It also means I have to use a dedicated
docker-compose yml file that doesn’t have volume mounts. This file is thus different from the ones I use when doing local dev with
I could switch to
machine type and still do the same
docker-compose commands. That would immediately give me volume mounts which makes it really easy to ship artifacts (e.g. test results xml files). It also makes it easier to store test result artifacts.
We did that on this project and it made the whole thing easier. And the bonus was that I can now use the (one) same
docker-compose.yml file for local dev as in my
What I don’t know is the risks, costs, and performance doing this. And this I’d love to hear from people in the community (and CircleCI employee experts).
For example; the documentation is clear about the fact the
docker starts instantly but
machine type can take up to 60 seconds to start. However, I’ve found it to often be much faster than that.
Another risk with
machine type is that it’s not clear which Linux system I’m using. With
docker you specify something like
ubuntu:18.04 as the container that builds the Docker containers.
And where do I see what the cost differences are?