Support newer version of docker-compose
Opened this issue ยท 13 comments
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.
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.
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).
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
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
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
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
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.
Thanks @ryansch, we just started seeing that error here too, and your suggestion fixed it for us.
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
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.
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/docker@1.7.0
Then on each job, there should be a step with just (without run):
- docker/install-docker-compose
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/docker@1.7.0
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
This not working for me..
check this:
CircleCI-Public/docker-orb#94 (comment)