Docker - Error response from daemon: client is newer than server

后端 未结 6 1507
忘掉有多难
忘掉有多难 2020-12-13 18:48

After creating a new machine with Docker Machine, I\'m getting the following error:

$ docker ps
Error response from daemon: client is newer than ser         


        
6条回答
  •  感情败类
    2020-12-13 19:19

    Apparently this error is due to docker-machine "falling asleep". Here is the magic command solving it for me:

    $ docker-machine restart default
    

    Or replace default by the name of your machine. The result is:

    $ docker-machine restart default
    Restarting "default"...
    Restarted machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
    

    As suggested, you may need to:

    $ docker-machine env default
    export DOCKER_TLS_VERIFY="1"
    export DOCKER_HOST="tcp://....."
    export DOCKER_CERT_PATH=".../.docker/machine/machines/default"
    export DOCKER_MACHINE_NAME="default"
    # Run this command to configure your shell:
    # eval $(docker-machine env default)
    

    And so you finally run that command:

    $ eval $(docker-machine env default)
    

    From now it should work.

提交回复
热议问题