We're using CircleCI and after the latest release of docker-compose
After the command is run
sudo pip install docker-compose
Downloading/unpacking docker-compose
Downloading docker_compose-1.10.0-py2.py3-none-any.whl (81kB): 81kB downloaded
we get an error when running
docker-compose -f docker-compose.ci.yml pull
ERROR: In file './docker-compose.ci.yml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.
docker-compose -f docker-compose.ci.yml pull returned exit code 1
Action failed: docker-compose -f docker-compose.ci.yml pull
docker-compose.yml is version 2.0 and it is working properly when using docker-compose 1.9.0
Running on Alpine 3.4
Can you share your docker-compose.yml (or a similar file that would let us reproduce the issue)? Thanks!
@shin- thank you! here's a similar snippet of our docker-compose.yml
version: "2"
volumes:
repos:
services:
tokumx:
image: ankurcha/tokumx
command: mongod --smallfiles
ports:
- 9876:9876
volumes:
- ./data/tokumx:/db
I am having the same issue, docker-compose.yml file is similar.
I have mitigated the issue in my CI by modifying the pip install command to sudo pip install "docker-compose>=1.6,<1.10". Its definitely not ideal, but I no longer get email alerts. Also, it confirms that the issue is caused by the new release.
On our case, we force docker-compose to stay on the previous release
sudo pip install "docker-compose==1.9.0"
That's odd, I'm not able to reproduce on my setup.
I pushed the image I used to attempt to reproduce as joffrey/repro4394 - maybe you can see if you find any significant differences with your setup that could account for the difference in results?
$ docker pull joffrey/repro4394
Using default tag: latest
latest: Pulling from joffrey/repro4394
Digest: sha256:29093ef1b885a41b8a2d79e113429f80a2e53149dc38b7aae8faec1fbfcaeaed
Status: Downloaded newer image for joffrey/repro4394:latest
$ docker run joffrey/repro4394 docker-compose version
docker-compose version 1.10.0, build 4bd6f1a
docker-py version: 2.0.1
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016
$ docker run joffrey/repro4394 ls
Dockerfile
docker-compose.ci.yml
docker-compose.yml
$ docker run joffrey/repro4394 cat docker-compose.ci.yml
version: "2"
volumes:
repos:
services:
tokumx:
image: ankurcha/tokumx
command: mongod --smallfiles
ports:
- 9876:9876
volumes:
- ./data/tokumx:/db
$ docker run -v /var/run/docker.sock:/var/run/docker.sock repro4394 docker-compose -f docker-compose.ci.yml pull
Pulling tokumx (ankurcha/tokumx:latest)...
latest: Pulling from ankurcha/tokumx
Digest: sha256:8be9f910cf0ab1bdee8404583680fa98b6c6331731d7d5486f93bfa2222a18db
Status: Image is up to date for ankurcha/tokumx:latest
@shin- thank you for the help! I just notice by running docker-compose version on circle CI that actually even when the latest version was being downloaded. It wasn't the version being used. To solve this i ran sudo pip install --upgrade pip before installing docker-compose
@MisterGlass maybe you will find this helpful https://github.com/circleci/docker/issues/5#issuecomment-273616333.
I'm closing this issue because is not really docker-compose related
I'll look into that. I am a bit confused though. If that isn't the version being used, how does forcing it to an old version fix the problem?
@MisterGlass i can guess that the version of pip in Circle CI is not the latest one and when it try to install docker-compose fails. Falling back to an older version. It's weird ¯_(ツ)_/¯
@ale7714 But it succeeds on the older version of docker-compose? Definitely weird. I'm wondering if the pip install modifies something shared between the two versions, breaking the older one.
Anyway, thanks for the fix. I'll try it later and report back.
@MisterGlass updating pip, allows the latest version of docker-compose to be installed successfully. That's what i'm thinking that probably the version of pip on Circle CI is outdated.
No worries, glad we found a fix
@ale7714 Based on one of the issues you linked, I removed the 'sudo ' portion of my pip install command. Works now.