我找不到/var/lib/下的docker目录。

huangapple go评论53阅读模式
英文:

I cannot find docker directory under /var/lib/

问题

我在 Mac M1 上安装了 Docker,想要访问容器的 -json.log 文件。我使用 docker inspect 找到了文件的位置,但是当我尝试访问该位置时,出现了错误,提示不存在 Docker 目录。我尝试使用 screen 命令,但同样出现了目录不存在的错误。

英文:

I have docker installed on Mac M1 and I want to access the -json.log file for a container. I found the location of the file using docker inspect but when I try to go to the location I get error saying docker directory does not exist.

I tried using screen command but it gave the same directory does not exist error.

答案1

得分: 1

在MacOS上使用:~/Library/Containers/com.docker.docker/Data/vms/0/
或者您可以创建一个shell脚本:screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

这篇文章可能会对您有所帮助:https://www.freecodecamp.org/news/where-are-docker-images-stored-docker-container-paths-explained/

英文:

on MacOS use : ~/Library/Containers/com.docker.docker/Data/vms/0/
or you can create shell script : screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

this article may be useful : https://www.freecodecamp.org/news/where-are-docker-images-stored-docker-container-paths-explained/

huangapple
  • 本文由 发表于 2023年5月18日 06:48:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76276665.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定