Task Containers accessing the docker containers


#1

I have a artifactory docker container installed on my machine and trying to access this in my pipeline

  • name: uaa-build
    type: artifactory
    source:
    endpoint: http://127.0.0.1:8081/artifactory
    repository: “/war-files/uaa”
    regex: “ArtifactorySample-(?.*).jar”
    username: admin
    password: password
    skip_ssl_verification: true

Trying to access artifactory instance via http://127.0.0.1:8081/artifactory from the task container where my build is executing and it complains about the below.

bash-4.4# curl http://127.0.0.1:8081/artifactory/webapp/#/home curl: (7) Failed to connect to 127.0.0.1 port 8081: Connection refused

Any suggestions on how do we access it from the task container? How are other docker containers accessed within the task containers created by Garden?


#2

You can’t use a loopback address to communicate with processes in different network namespaces (broadly speaking, containers). So you should use a non-loopback address for artifactory.


#3

In my setup, Concourse and other services are all running into Docker container, and I use Docker networking to connect Concourse workers and other services.

Then, I can use internal DNS names to access services.You can find an example there: https://github.com/loganmzz/concourse-installation