我正在尝试在Docker上运行Tomcat 7。
team sudo Docker pull kotyara:7.0.62-jre8
进展顺利。下载成功。
尝试使用某些参数运行映像后,命令如下所示:
sudo Docker run -D -P -In /storage/data/kotyar/web applications:/usr/local/kotyar/web applications -In /storage/data/kotyar/logs:/usr/local/kotyar/logs-kotyar name:7.0.62-jre8 . Then I get the following error:
响应守护程序的错误:
lstat / storage / docker / overlay 2 / 6dd8ad08f0702d88f545c6fad62b58f74c95dc5e234fe7668536407019bcebbd:无此类文件或目录。看到。 “ docker run --help”部分
我也尝试只运行没有任何参数的映像,仍然出现相同的错误。图像运行示例:
sudo Docker run-name Tomcat Tomcat:7.0.62-jre8
我如何摆脱这个问题?还是我做错了什么?
答案 0 :(得分:0)
如果您正在XFS之上运行overlay或overlay2,请确保在
docker info
的输出中看不到此警告:The backing xfs filesystem is formatted without `d_type` support, which leads to incorrect behavior.
使用
ftype=1
重新格式化文件系统以启用d_type
支持。您还可以在
d_type
的输出中的存储驱动器部分中查看“支持docker info
”字段:Storage Driver: overlay Backing Filesystem: xfs Supports d_type: false
如果您看到该警告,则可能是与此有关。
已知在没有
d_type
的XFS上运行叠加层(或overlay2)会导致问题。
Docker当前“允许”其在现有安装中向后兼容,但在全新安装中将不使用overlay / overlay2驱动程序。还会看到这些问题,其中包含一些信息#10294,#29873。
RHEL发行说明中提到:“ File Systems / OverlayFS”:
请注意,必须在启用
-n ftype=1
选项的情况下创建XFS文件系统以用作覆盖。
使用rootfs
和在系统安装期间创建的任何文件系统,在Anaconda kickstart中设置--mkfsoptions=-n ftype=1
参数。
安装后创建新文件系统时,请运行# mkfs -t xfs -n ftype=1 /PATH/TO/DEVICE
命令。
要确定现有文件系统是否适合用作覆盖,请运行# xfs_info /PATH/TO/DEVICE | grep ftype
命令以查看ftype=1
选项是否已启用。
因此,首先,仔细检查docker info
的输出:您的问题取决于您的操作系统和docker版本。