0
我正在将我现有的Jenkins实例从一台服务器迁移到另一台服务器中托管的Docker。顺便说一下,我是新来的Docker。Jenkins在Docker中:无法解析VCS主机
我能够在Docker中运行Jenkins实例没有问题。然而,当我运行作业,它无法连接到VCS回购: -
stderr: fatal: unable to access 'http://tfs/path/to/app/': Could not resolve host: tfs
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807)
应该如何我泊坞窗的配置看,以获得VCS主机来解决?
我现在的码头工人,compose.xml看起来是这样的: -
version: '2'
services:
jenkins:
image: "jenkinsci/jenkins"
ports:
- "80:8080"
volumes:
- ./jenkins:/var/jenkins_home
environment:
JAVA_OPTS: "-Xms2048m -Xmx4096m"
非常感谢你。
谢谢。 'dns'和'dns_search'的组合对我来说是个诀窍。 – limc