Docker-compose.yml version 2.3


#1

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?


#2

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


#3

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?


#4

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).


#5

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.


#6

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?


#7

@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?