runner's services' bind connection back to main job container
Description
This configuration is currently impossible:
test:
image: php:5.6.30-cli
services:
- alpeware/chrome-headless-beta:ver-59.0.3071.8
script:
- php -S 0.0.0.0:8000
Let's say that chrome-headless, inside the service, is intended to browse the application served by the current job, on port 8000 (Chrome devtool API on http://alpeware-chrome-headless-beta:9222). The issue is that Chrome has no (known) way to access current's job port 8000.
- hostname: could be determined (should be inside $HOSTNAME)
- hostname must be resolved by the alpeware/chrome-headless-beta. This is not the case. Current IP must be known (environment?)
- network/ip: must be accessible for connexion initiated by alpeware/chrome-headless-beta
Proposal
Give the ability for a jobs's service to connect back to the main job (or document it if it's already possible)
In this specific case, as a workaround, I had to build my own image containing all the software needed in order to run everything using background processes (and belonging to the same job)
Links / references
Documentation blurb
Docker helps making each application a container. Most app' provide network protocol to communicate securely without having to share a container/filesystem/... That's the role of Docker's "link". To configure network links (routing, name resolution, ...) between parallel job, you need ... ... ...