We have a multi container setup and use docker-compose to manage them. Ideally, we would want to use docker-compose to manage/compose our images instead of ‘containerInfo’. Can this be done? Is there an executorType: docker-compose ?
executorType: machine and use
docker-compose as you would normally. It’s brief, but there is some documentation on it here:
I am trying to experiment with how our docker-compose based work flow will change based on what
executorType we choose.
The example project here: https://github.com/circleci/cci-demo-flask only has
docker executorType. I wish it had
executorType: machine example also. Probably a
circle.machine.yml. Are you guys thinking about adding it?
@sul4bh I ported PrestoDB to 2.0 and used the machine configuration. It’s open source, so feel free to reference it as an example.
Is it a fair assumption that there is a speed penalty when using machine instead of docker?
Yes, there’s an overhead for provisioning a machine executor–the delay comes from spinning up a private Docker server for you.
In contrast, a Docker executor runs on a shared Docker server that’s already provisioned. We lock down some Docker behavior on this executor to secure your builds. This restricts your ability to use docker-compose.
So this mean that for example i cannot use volumes? i have a docker-compose file that share local directories with container inside as a volume common notation:
But inside container there is nothing under /var/www
Is this related to the confinement that you mention or there is anything i need to do or im doing wrong?
I believe that should work with
executorType: machine, but not with
executorType: docker. Which one were you trying to run this on?
With executorType: docker. Any specific reason for that? i know that when you request a docker engine like type: setup-docker-engine circle provides a remote engine created with docker-machine but it should also work
i know that when you request a docker engine like type: setup-docker-engine circle provides a remote engine created with docker-machine but it should also work
You’re correct that
executorType: docker combined with
setup-docker-engine provides a remote engine like one created with docker-machine. Volume mounting and port forwarding don’t work as one would expect in this setup. From what I understand, Docker running on Mac had/has similar limitations.
This build combination is mainly intended for users who want to build docker images and deploy them, but don’t need to get into more complex Docker setups–like performing volume mounting.
@bitgandtter If you’ve tried the
executorType: machine already, it’d be helpful to hear what’s not working out with that.
Spinning up two containers that need to communicate
We have included documentation for using docker compose in 2.0