macos - 为什么我在 MacOS 中收到 Screen is terminating 错误

标签 macos docker devops

尝试在 mac 中进入 Docker VM 时,出现屏幕正在终止错误,因此我无法进入 Docker Desktop。在 Mac 中,Docker 主机不是 mac,因为它作为 VM 运行。有什么解决办法吗?
r
感谢您的帮助。

最佳答案

解决方法
我认为这是 Docker Desktop for Mac 版本 2.3.0.4 以来的一个错误,因为我使用了 screen过去在 Mac 上成功访问 Docker VM,没有此问题。 (编辑:这个问题似乎仍然存在于版本 2.4.0.0)
有一些替代方法可以访问 Docker VM。这是一个对我有用的:
解决方法一
运行以下命令进入 Docker VM 的 shell:

docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh
然后,您可以在 Docker 卷的通常位置执行您需要执行的操作:
/ # ls -lah /var/lib/docker/volumes/
total 72
drwx------   10 root     root        4.0K Aug 27 11:34 .
drwx--x--x   15 root     root        4.0K Oct 31 00:51 ..
drwxr-xr-x    3 root     root        4.0K Aug 26 10:44 14ce94e174839f1947efa6fcbf5ac1fb2ea3b0f0b3f25311fee333ee374576b6
drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 34eb2bd80931ff954e1da80c5383beb4def61129d4005432b77080531cd10a5a
drwxr-xr-x    3 root     root        4.0K Aug 27 11:34 830de2ce31519c921b50c448964b54517ca4461d337b56a9fd6e5b354ace3247
drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 data-layer_mongo_data
drwxr-xr-x    3 root     root        4.0K Aug 26 11:01 ebb440184703bfad17184bd5ff74b677b50d74b8f0fbdd116506a1fcacfb00cd
drwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_back-end_log
drwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_front-end_log
drwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_mongo_data
-rw-------    1 root     root       64.0K Oct 31 00:51 metadata.db
解决方法2
这是另一个对我有用的。
运行以下命令进入 Docker VM 的 shell:
docker run --rm -it --privileged --pid=host walkerlee/nsenter -t 1 -m -u -i -n sh
和以前一样,这里是 Docker 卷的目录所在的位置:
/ # ls -lah /var/lib/docker/volumes/
total 72
drwx------   10 root     root        4.0K Aug 27 11:34 .
drwx--x--x   15 root     root        4.0K Oct 31 00:51 ..
drwxr-xr-x    3 root     root        4.0K Aug 26 10:44 14ce94e174839f1947efa6fcbf5ac1fb2ea3b0f0b3f25311fee333ee374576b6
drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 34eb2bd80931ff954e1da80c5383beb4def61129d4005432b77080531cd10a5a
drwxr-xr-x    3 root     root        4.0K Aug 27 11:34 830de2ce31519c921b50c448964b54517ca4461d337b56a9fd6e5b354ace3247
drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 data-layer_mongo_data
drwxr-xr-x    3 root     root        4.0K Aug 26 11:01 ebb440184703bfad17184bd5ff74b677b50d74b8f0fbdd116506a1fcacfb00cd
drwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_back-end_log
drwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_front-end_log
drwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_mongo_data
-rw-------    1 root     root       64.0K Oct 31 00:51 metadata.db

关于macos - 为什么我在 MacOS 中收到 Screen is terminating 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63445657/

相关文章:

angular - 在 DevOps 中自动增加 Angular6 库版本

angularjs - 如何结合 Play Framework 和angular2?

git - 停止将代码直接 checkin VSTS 中的 master 分支的权限

c++ - macOS 中/proc 是否有替代方案?

r - 调度 R 脚本 - OSX

macos - Mac OS X 下 Web 服务器的正确目录布局是什么?

java - 连接被 Docker 中的两个微服务拒绝

python - 如何编辑部署在docker中的python项目的源代码

docker - 尝试从Docker容器访问共享内存时“Permission denied”,即使--ipc设置为“host”

objective-c - 在 Mac 的守护进程/根进程中获取当前用户语言和区域的最佳方法是什么?