栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

如何使用脚本自动在浏览器中启动jenkins

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何使用脚本自动在浏览器中启动jenkins

转到您的wifi信息并获取系统。例如,您的HOST IP使用192.168.1.1

ifconfig oripconfig
和用户名,
whoami
然后在容器中,您可以像

ssh user_name@192.168.1.1 'DISPLAY=:0 firefox http://192.168.1.1:8080'

适用于linux。

如果主机是窗口,则可以运行

ssh user_name@192.168.1.1 'DISPLAY=:0 start http://192.168.1.1:8080'

如果您想避免使用用户名和密码,则只需使用公钥-私钥,然后使用该密钥将您的公钥放入容器和ssh。

要么

docker exec -it container_name ash|bash -c ssh user_name@192.168.1.1'DISPLAY=:0 firefox http://192.168.1.1:8080'

您可以在os上运行不同的命令库

    if [[ "$OSTYPE" == "linux-gnu" ]]; then        # ...elif [[ "$OSTYPE" == "darwin"* ]]; then        # Mac OSXelif [[ "$OSTYPE" == "cygwin" ]]; then        # POSIX compatibility layer and Linux environment emulation for Windowselif [[ "$OSTYPE" == "msys" ]]; then        # Lightweight shell and GNU utilities compiled for Windows (part of MinGW)elif [[ "$OSTYPE" == "win32" ]]; then        # I'm not sure this can happen.elif [[ "$OSTYPE" == "freebsd"* ]]; then        # ...else        # Unknown.fi

https://support.rackspace.com/how-to/logging-in-with-an-ssh-private-key-on-
linuxmac/



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/415654.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号