Docker error: client and server don't have same version

前端 未结 14 1466
谎友^
谎友^ 2020-12-04 14:30

Since I just updated Docker to 1.1.0 I get:

Error response from daemon: client and server don\'t have same version (client : 1.13, server: 1.12)

<
相关标签:
14条回答
  • 2020-12-04 14:45

    In case you use docker-machine to manage a local VirtualBox-based machines the solution is as simple as for boot2docker:

    docker-machine upgrade MACHINE_NAME
    

    It asks docker-machine to download the latest boot2docker.iso and place it as a new root filesystem in the upgraded VM.

    By the way, the VirtualBox-backed docker machine has its root filesystem readonly. That mean it's not possible for any manual update survive the machine reboot. That was a surprise for me.

    0 讨论(0)
  • 2020-12-04 14:47

    The only thing the worked for me was removing the boot2docker image from VirtualBox then completely deleting ~/.boot2docker folder, and finally running boot2docker init again.

    0 讨论(0)
  • 2020-12-04 14:49

    Ansible Answer:

    If you came there by Ansible and not boot2docker, here is the solution: Use the docker_api_version: auto argument

    - name: Mongo data container
      docker:
        docker_api_version: auto
        name: mongo-primary-dc
        image: debian:wheezy
        state: present
        volumes:
        - /data
    

    I guess the reason is that the docker-py module used by Ansible is often not at the same version as the Ubuntu apt-get repository.

    0 讨论(0)
  • 2020-12-04 14:50

    My solution was to do a Close > Power Off on the docker VM in VirtualBox, and then restart Kitematic. This fixed it for me.

    0 讨论(0)
  • 2020-12-04 14:54

    This can happen if you have updated Docker, but the service has not been restarted. You will then try to connect to the Docker daemon with the updated client, while the daemon (that was already running before the update) is still running the older version.

    To fix this, restart the service:

    sysV init:

    service docker restart

    systemd:

    systemctl daemon-reload

    systemctl restart docker

    0 讨论(0)
  • 2020-12-04 14:55

    The only thing that worked for me was killing the process and starting it with "sudo service docker start".

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