Docker-compose.yml version 2.3

i’m using the machine image circleci/classic:latest, and it’s breaking on the docker-compose yaml file version. is there any way to fix this?

How is it breaking? Please offer as much detail as you can.

it says outright it doesn’t support docker-compose yaml 2.3 (not necessarily any particular version of docker-compose itself). so i guess the question is more, is there a pre-set machine that supports [the docker-compose version that supports] that yaml version?

or should i be looking into a more custom config for the machine?

What says this? :smiley_cat:

If you are relying on a pre-installed version of Docker or Docker Compose, you can always upgrade it to the latest version. The one in the OS repo may be more recent, or you can add the Docker repo to the machine one, and then update to that (latest stable).

Hey,

So the problem is, as the message state, it’s not supported. You are trying to use the Docker Compose v2.3 file syntax which requires Docker Compose v1.16 and higher. The default machine image on CircleCI is using Docker Compose v1.14.

I’d suggest using a newer machine image such as in the example below:

version: 2
jobs:
  build:
    machine:
      image: circleci/classic:201808-01
    steps:
      - checkout

The image above includes Docker v18.06.0-ce and Docker Compose v1.22.0.

1 Like

I landed on this post by chance after looking for a way to know what image I could use to support Docker-compose file version 3.4. Is there a page listing the circleci/classic images with the matching docker engine version?

@arthurio: if you are using Docker Compose, you may not need to use Machine. Docker Compose works very nicely inside the Docker executor (i.e. Docker in Docker). Do you have a particular reason to use Machine?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.