Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update docker-compose on Docker for Windows?

I've installed Docker for Windows on my machine (Windows 10, Hyper-V). Version is 18.03.0-ce. But the version of docker-compose is 1.20.1. I want to run docker-compose with a docker-compose.yml file containing the property version : '2'. I get the error:

client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version

How can i upgrade to a newer version of docker-compose?

like image 967
Rolf Avatar asked Mar 29 '18 11:03

Rolf


3 Answers

I do not know you have still the same issue or not. Please check "version" value in the docker-compose.yml file should be more than "2". For me I changed it to "2.1" and it worked. version: '2.1' in the compose file is the minimum supported version for Windows containers. I found it from here: https://github.com/docker/for-win/issues/268

like image 141
mehdi mohammadi Avatar answered Oct 05 '22 23:10

mehdi mohammadi


ERROR : client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version

The above error will be resolve by simply changing the version as from 2.0 to 2.1 in your docker-compose.yml file

I have searched so many sites but even I could not find the root-cause, exact reason and how it is resolving by changing the version number in our compose file.

It will be helpful to all of us if anyone post the root cause and solution

like image 41
naveenkumar.s Avatar answered Oct 05 '22 23:10

naveenkumar.s


Please Update version "2.0" to "2.1"

docker-compose.yml

 version: '2.1'services:
  web:
    build: flask/.
    ports:
     - "5000:5000"
    volumes:
     - .:/code
  mysql:
    build: db/.
    environment:
      MYSQL_DATABASE: vs_engine
      MYSQL_ROOT_PASSWORD: root
      MYSQL_ROOT_HOST: 0.0.0.0
      MYSQL_USER: root
      MYSQL_PASSWORD:
    ports:
      - "3306:3306" 
like image 32
Keshri Nanadan Shrivastava Avatar answered Oct 06 '22 00:10

Keshri Nanadan Shrivastava