V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
awanganddong
V2EX  ›  程序员

gitlab 的使用操作

  •  
  •   awanganddong · Feb 21, 2023 · 1590 views
    This topic created in 1171 days ago, the information mentioned may be changed or developed.

    昨天通过 docker-compose 配置了 gitlab 的环境。 然后通过 docker-runner 执行脚本的时候发现需要引入宿主机的命令,对 sonar-scanner 的操作(此安装在容器外)。

    如果我强行集成的话,违背了容器的单一原则。

    所以想问下,这种牵扯到容器外的,是把 sonar 继续集成到容器内吗

    2 replies    2023-02-22 10:24:15 +08:00
    SKYNE
        1
    SKYNE  
       Feb 21, 2023
    runner 有好几种类型,你这种需要依赖宿主机环境的应该使用 shell 类型的 runner 吧
    elsove812
        2
    elsove812  
       Feb 22, 2023
    要是用 k8s ,sonar-scanner 容器放在一个 pod 中就可以了,或者可以使用 dind 镜像,启动一个容器运行时,动态使用 image 运行一个 container 。
    docker-compose 我想到的只能是创建一个 volume ,命令行工具放在上面,之后 docker-runner 容器挂载它。没实践过,只是想想~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5742 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 03:45 · PVG 11:45 · LAX 20:45 · JFK 23:45
    ♥ Do have faith in what you're doing.