How do I undo the command $ eval “$(docker-machine env blog)”

后端 未结 5 1285
一个人的身影
一个人的身影 2021-02-01 17:47

I think that command redirected $ docker commands to the docker machine. Now all my docker commands are giving me an error FATA[0000] Couldn\'t read ca cert.

5条回答
  •  故里飘歌
    2021-02-01 18:08

    I can see that this is an old post but if someone else runs into this issue, who is new to docker like me this can help. By typing:

    eval $(docker-machine env nameOfVm) 
    

    you are setting your current shell to use docker in that docker-machine. You can check if you type docker-machine ls that under active tab, that status is changed from - to * for that machine. You can also check which machine is active by running docker-machine active.

    If you want to undo eval, just run:

    eval $(docker-machine env -u)
    

    and it will unset variables for active machine (You don't have to specify the name of the machine). This is all under macOS but I think it should be same on linux as well. You can read more about this here: Docker documentation: docker-machine env

提交回复
热议问题