Docker build failed with error "client is newer than server"

It was success 3 days ago, but unable to build success now, (I clicked the Rebuild button without any source code change)

My circle.yml:

    - docker

    - sudo pip install docker-compose

    - sudo service mysql stop
    - ( set -o posix ; set ) | grep CI_ > env/test.env && echo "$(tail -n +2 env/test.env)" > env/test.env
    - docker-compose -f docker-compose-testing.yml build
    - docker-compose -f docker-compose-testing.yml run web
    - cat ~/hopamchuan-web/mount/phpcs/report.txt
    - cp -r ~/hopamchuan-web/mount/test-report/* $CIRCLE_ARTIFACTS
    - mkdir -p $CIRCLE_TEST_REPORTS/phpunit
    - cp ~/hopamchuan-web/mount/test-report/junit.xml $CIRCLE_TEST_REPORTS/phpunit/junit.xml

CircleCI error message:

docker-compose -f docker-compose-testing.yml build
mysql uses an image, skipping
Building web

ERROR: client is newer than server (client API version: 1.21, server API version: 1.20) docker-compose -f docker-compose-testing.yml build returned exit code 1

I’m not sure if you guys have changed something obviously backward incompatible here. Please someone give me the migration guide or instruction on how to fix this.

Thank you!

I encountered the same issue with several of my builds and was able to resolve by removing the block that installs Docker Compose as a dependency.

CircleCI will preinstall Docker 1.8.2 and Docker Compose 1.5.1, so it’s not a requirement that Docker Compose be installed manually. Furthermore, pip will now install Docker Compose 1.6.0 which appears to be the issue.

Thank you, I removed the docker-compose dependency and it worked.