令人哇塞的酷鸡 发布的文章

docker decktop开始收费了,不过docker还是免费开源的. docker decktop做角色其实就是 虚拟机 + linux系统 + docker; 因为docker是利用linux内核来管理资源, 所以你的mac没法直接跑docker(mac系统是没有linux内核的). 因为docker还是免费开源,你自己搭建一个linux环境也是能直接使用docker的. 调研多种方案给出最推荐的方式.避免你选择困难症.
  1. 使用社区版
    推荐.除了没有像docker那样图形管理界面的能力,但其他都一样,要用时敲下命令是一样的.和docker一样,只要安装下安装包.
    社区版本下载地址
  2. 还有个不错的替代者: https://github.com/abiosoft/colima

注意: docker卸载后所有容器和镜像都会没掉,所以卸载前一定要记得备份
备份也很简单,步骤如下:

  1. Open Terminal on your Mac.
  2. In the Terminal window, type the following command to list all your Docker images:

    docker images
  3. Note the image ID or names of the images you want to keep.
  4. Type the following command to save the images to a .tar file:

    docker save -o /path/to/save/myimage.tar myimage

    Replace /path/to/save/ with the path to the directory where you want to save the .tar file, and myimage with the image name or ID you noted in step 3.

  5. Repeat step 4 for each image you want to save.
  6. Once you have saved all the images, you can uninstall Docker Desktop as you normally would.
  7. When you reinstall Docker Desktop, you can restore the saved images by typing the following commands:

    docker load -i /path/to/save/myimage.tar

    Replace /path/to/save/ with the path to the directory where you saved the .tar file, and myimage with the image name or ID you want to restore.
    Repeat this command for each saved image.