Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Support newer version of docker-compose #5

Open
zbyte64 opened this issue Apr 7, 2016 · 13 comments
Open

Support newer version of docker-compose #5

zbyte64 opened this issue Apr 7, 2016 · 13 comments

Comments

@zbyte64
Copy link

zbyte64 commented Apr 7, 2016

Currently only docker-compose 1.5.0 or older will work with the installed version of docker. This means version 2 of the docker-compose.yml format is incompatible with circle ci.

@vegasbrianc
Copy link

Any updates to this? version 2 compose files contain features which I need for my project to run and I would imagine more and more version 2 files will come while version 1 files are slowly being phased out.

@adrielldagasuan
Copy link

i also agree. need version 2 to specify image name in the build (unless someone knows how to specifically define image name in version 1 compose files that would be of great help).

@ygotthilf
Copy link

ygotthilf commented Aug 10, 2016

I found a solution thanks to @adrien-dong 👍 . In your circle.yml :

machine:
  pre:
   - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
   - sudo pip install docker-compose

The versions should be :

  • docker 1.10.0-circleci
  • docker-compose 1.8

@vegasbrianc
Copy link

Hi @ygotthilf Are you using version 2 compose files? I tried your suggestion but now it is not compatible with the engine version which is keeps failing to upgrade

@deepflame
Copy link

Great stuff @ygotthilf but unfortunately caching docker layers does not work with 1.10...

Issue: moby/moby#20380
https://circleci.com/docs/docker/#caching-docker-layers

@portenez
Copy link

I applied @ygotthilf 's workaround and it worked for a while, but then all of a sudden it doesn't work. Has anyone bump into this problem again?

All of a sudden the workaround doesn't update docker compose:

docker-compose version
docker-compose version 1.5.2, build 7240ff3
docker-py version: 1.5.0
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013

@ryansch
Copy link

ryansch commented Jan 18, 2017

I just fixed this in our app this morning.

Replace sudo pip install docker-compose with:

    - curl -L https://github.com/docker/compose/releases/download/1.10.0/docker-compose-`uname -s`-`uname -m` > /home/ubuntu/bin/docker-compose
    - chmod +x /home/ubuntu/bin/docker-compose
    - docker-compose version

I went with /home/ubuntu/bin as it's earlier in the PATH than /usr/local/bin which even root doesn't have access to.

@iamdave92
Copy link

Thanks @ryansch, we just started seeing that error here too, and your suggestion fixed it for us.

@kevunix
Copy link

kevunix commented Jan 18, 2017

FYI if you ran into docker-compose.yml version issue in the past day or so.

https://discuss.circleci.com/t/docker-compose-version-change/9685

@yookoala
Copy link

yookoala commented Feb 23, 2017

I went with this:

    - curl -L https://github.com/docker/compose/releases/download/1.10.0/docker-compose-`uname -s`-`uname -m` > /home/ubuntu/bin/docker-compose
    - chmod +x /home/ubuntu/bin/docker-compose
    - docker-compose version

Then when I try to run docker-compose up -d some-service in Circle, this error appears

ERROR: The Docker Engine version is less than the minimum required by Compose. Your
current project requires a Docker Engine of version 1.10.0 or greater.

ckolos added a commit to mozilla-services/phabricator-extensions that referenced this issue Jun 2, 2017
  - circle.yml: now that the tasks for the tests exist, let's make circle actually
run them
  - tasks.py: added linefeeds to make flake8 shut up. ;), Docstring too.
  - circle.yml: work around broken circleci docker-compose
  - tasks.py: debug the link step
  - circle's version of docker-compose doesn't support the version "2"
syntax in docker-compose.test.yml. Using a hint found here:
circleci/docker#5, we are able to load a
newer version of docker-compose into a location earlier in the path that
allows the build to complete with a newer version of docker-compose.

Fix errors coming from removing btrfs root volumes in docker builds

  - tasks.py: attempting to fix moby/moby#22547 via https://circleci.com/docs/1.0/docker-btrfs-error/; explicitly set rm=false
  - tasks.py: eventually, remove the rm completely to fix moby/moby#22547; successful fix
  - rather than linking the file, it makes more sense (and works better)
to copy the file into place where the fs expects it to be. All attempts
to do this with linking fail, cp /tmp works.

Remove debugging statements.
zalun pushed a commit to mozilla-services/phabricator-extensions that referenced this issue Jun 5, 2017
  - circle.yml: now that the tasks for the tests exist, let's make circle actually
run them
  - tasks.py: added linefeeds to make flake8 shut up. ;), Docstring too.
  - circle.yml: work around broken circleci docker-compose
  - tasks.py: debug the link step
  - circle's version of docker-compose doesn't support the version "2"
syntax in docker-compose.test.yml. Using a hint found here:
circleci/docker#5, we are able to load a
newer version of docker-compose into a location earlier in the path that
allows the build to complete with a newer version of docker-compose.

Fix errors coming from removing btrfs root volumes in docker builds

  - tasks.py: attempting to fix moby/moby#22547 via https://circleci.com/docs/1.0/docker-btrfs-error/; explicitly set rm=false
  - tasks.py: eventually, remove the rm completely to fix moby/moby#22547; successful fix
  - rather than linking the file, it makes more sense (and works better)
to copy the file into place where the fs expects it to be. All attempts
to do this with linking fail, cp /tmp works.

Remove debugging statements.
@CrimsonGlory
Copy link

for those reaching here in 2021, the easier way to install compose is adding the following two lines after the first line (version 2.1):

orbs:
    docker: circelci/[email protected]

Then on each job, there should be a step with just (without run):

  - docker/install-docker-compose

@camilojimenezf
Copy link

for those reaching here in 2021, the easier way to install compose is adding the following two lines after the first line (version 2.1):

orbs:
    docker: circelci/[email protected]

Then on each job, there should be a step with just (without run):

  - docker/install-docker-compose

This not working for me..

This error appears:

Latest stable version of docker-compose is v2.0.1
A different version of docker-compose is installed (docker-compose version 1.25.4, build xxxxx); removing it

@CrimsonGlory
Copy link

This not working for me..

check this:
CircleCI-Public/docker-orb#94 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests