Is there support for docker-compose file in nomad?

Is nomad support for a job running a docker-compose file?

Or do my container settings need to be passed directly into the .nomad configuration file?

1 Like

Hi @CamilaBetim,

Thanks for using Nomad!

I suspect you could use the raw_exec driver to run a docker-compose command on the machine but at that point, you wouldn’t receive many of the other benefits of Nomad. Nomad a container orchestrator itself (as well as other types of workloads), so it is probably more useful to think of it as an alternative to docker-compose.

I’m curious about your use-case for using docker-compose from Nomad. Do you mind sharing?

@DerekStrickland and the Nomad team

Hi! Thank you so much for the feedback!

What I would actually like to do is download an artifact via the git hub, considering that this artifact is a docker-compose.yaml file.

After that, I’d like to give a docker-compose up command after this downloaded file so it can go up a container with the Docker-compose file settings.

the biggest reason is that we have A LOT of different software already configured with docker-compose, and to save time re-configuring everything we thought of using docker-compose

I see. Well, I suppose you could do that with raw_exec, but then Nomad would have no ability to manage the lifecycle of the containers since it didn’t spawn them, and isn’t monitoring them.

To download your artifact you can reference this guide.

However, if you want to use Nomad, you probably do need to convert your docker-compose files to Nomad jobspecs. This post shows another user working through the same thing.

IMO, I think you are looking at a conversion project rather than a lift-and-shift project.

@DerekStrickland and the Nomad team


Thanks for the feedback. My team and I are reconsidering the use of Docker Compose, we were able to analyze that it would actually be more advantageous to pass these settings in Nomad. Thanks!