分类 默认分类 下的文章

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.

如题,在活动监视器强制退进程又退不掉,这不整得跟流氓一样吗,那肯定不行,我的电脑我做主.为此,以下就是我退出这些进程的方法:
这些程序其实就是守护进程,这些程序可能位与以下5个目录任意一个:

  • /Library/LaunchDaemons 和 /System/Library/LaunchDaemons: 当你开机,该目录下的程序会以root用户运行
  • /Library/LaunchAgents 和 /System/Library/LaunchAgents: 当任何用户登入,该目录下的程序也会以root用户运行
  • /Users/你的用户名xxx/Library/: 但xxx用户登录时,该目录下的程序以该用户运行

注意,不能动的目录: /System/Library/LaunchDaemons 和 /System/Library/LaunchAgents, 这2个目录下是系统程序,你不要动.
其他目录你就可以按需处理了.
禁用程序: launchctl unload 程序的完整路径. 比如你cd /Library/LaunchDaemons, 然后发现有个a的程序要禁用,那么执行sudo launchctl unload a即可
如果要开启之前禁用的只需将刚命令中的unload换成load即可.

此外有些程序无法用launchctl unload命令禁用, 需用launchctl bootout,用户可见如下连接不再赘述.

怎么删除启动和登录的程序
launchd用法详解
launchd用法详解