Docker 如何在容器中以随机用户身份运行github cli

Docker 如何在容器中以随机用户身份运行github cli,docker,github-cli,Docker,Github Cli,我已成功在容器中安装github cli,但无法以随机用户身份运行它(由于安全原因,open shift确实以随机用户身份运行容器) 我应该事先创建哪些目录/chmod/chown才能使其正常工作 谢谢大家! docker文件: RUN wget https://github.com/cli/cli/releases/download/v1.0.0/gh_1.0.0_linux_amd64.deb RUN dpkg -i gh_*_linux_amd64.deb RUN chmod g+rwx

我已成功在容器中安装github cli,但无法以随机用户身份运行它(由于安全原因,open shift确实以随机用户身份运行容器) 我应该事先创建哪些目录/chmod/chown才能使其正常工作

谢谢大家!

docker文件:

RUN wget https://github.com/cli/cli/releases/download/v1.0.0/gh_1.0.0_linux_amd64.deb
RUN dpkg -i gh_*_linux_amd64.deb
RUN chmod g+rwx -R /usr/local/bin/gh  # <- not enough
RUN gh version
有一只虫子在里面,它是
gh--版本
gh版本


另外,
在前面提到的命令帮助下运行chmod g+rwx-R/usr/local/bin/

也许这可以帮助您。文档中有一个bug,它是
gh--version
而不是
gh version