docker-compose up leads to “client and server don't have same version (client : 1.14, server: 1.12)” error but client and server have the same version

后端 未结 9 2035
别那么骄傲
别那么骄傲 2020-12-08 06:22

docker version prints:

Client version: 1.0.1
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 990021a
Server version:          


        
相关标签:
9条回答
  • 2020-12-08 07:14

    Since docker-compose 1.4 you can set the client API version, you don't have to downgrade the client or upgrade the server.

    You do not have to set a specific API version either, you can set the environment variable COMPOSE_API_VERSION=auto to have it auto-detect the client version.

    0 讨论(0)
  • 2020-12-08 07:22

    I had the same problem on my Mac - some months ago I installed docker, boot2docker und docker-compose (formerly fig) via brew. After I played a while with docker, I left it for some reason as it was. Now new docker-toolbox and docker-machine come into play and I "just" wanted to use a preconfigured docker-file and say "up". I got the error above.

    I tried all things i found on the net - also the downgrade-option (which didn't feel right for me). The thing finally worked, was just to install new docker-toolbox via homebrew cask and upgrade my docker-vm with the following commands:

    docker-machine upgrade docker-dev

    Where "docker-dev" is your docker-vm-Name in Virtualbox (start it, to see the correct name).

    Now docker runs fine again and the docker version command brings a normal-setup`s output.

    0 讨论(0)
  • 2020-12-08 07:23

    Try restarting the docker service after upgrading Docker (sudo service docker restart).

    I had a very similar issue, upgraded Docker, and kept running into the same error message until I restarted the service. (See https://serverfault.com/a/700707/295500.)

    0 讨论(0)
提交回复
热议问题