JFrog Xray安装在CentOS上进行Docker安装-权限被拒绝

时间:2019-03-15 14:03:29

标签: artifactory jfrog-xray

尝试使用Docker安装程序在CentOS计算机上安装JFrog Xray。 我创建了/ opt / xray目录,将安装文件下载到其中。

然后对该文件运行chmod + x X射线。

当我尝试使用sudo“ ./xray install”安装时,得到以下输出:

[root@xray xray]# sudo ./xray install
INFO: Using XRAY_MOUNT_ROOT=/root/.jfrog/xray
Verifying Xray prerequisites ...
WARNING: Running with 3GB Total RAM
WARNING: Running with 1 CPU Cores
The System resources are not aligned with Xray minimal prerequisites, Do you want to proceed with the process? [Y
touch: cannot touch '/data/installer.info': Permission denied
Are you adding this node to an existing cluster? (not relevant for the first cluster node) [Y/n]: n
mkdir: cannot create directory '/xray_global_mount_root/xray': Permission denied
./wrapper.sh: line 583: /xray_global_mount_root/xray/ha/ha-node.properties: No such file or directory
./wrapper.sh: line 586: /data/installer.info: Permission denied
./wrapper.sh: line 589: /data/installer.info: Permission denied
./wrapper.sh: line 592: /data/installer.info: Permission denied
ERROR: Installation failed

任何想法可能是什么原因造成的?

1 个答案:

答案 0 :(得分:1)

我在RHEL上遇到了类似的问题,这是selinux造成的。要解决此问题,请在X射线脚本中更改以下行:-

XRAY_VOLUMES="-v ${XRAY_MOUNT_ROOT}/xray-installer:/data -v ${XRAY_MOUNT_ROOT}:/xray_global_mount_root"

对此:-

XRAY_VOLUMES="-v ${XRAY_MOUNT_ROOT}/xray-installer:/data:z -v ${XRAY_MOUNT_ROOT}:/xray_global_mount_root:z"

(基本上在每个卷中添加:z)。

这确保该文件夹被标记为供selinux中的多个容器使用。