Add support for tuning the start of linked services

Background: https://github.com/docker-library/docker/pull/12

Executor: docker


Some images needs entrypoint arguments instead of environment variables to configure the service. Unfortunately this is needed for the docker:dind image. So when an user wants to pass a custom docker registry mirror, he needs at the moment an patched version of this image to support an environment variable.

The current approach to configure services looks like this:

job:
  services:
    - postgres:9.5
    - redis:3.2

I would like to see an ability to configure starting options like docker-compose.yml supports. It could look like this:

job:
  services:
    "docker:dind":
      command: --registry-mirror=http://mymirror:6000

There could be also an environment array node to configure specific environment variables only for this service. (To stop pollution on environment variables on all related containers)

job:
  services:
    "docker:dind":
      command: --registry-mirror=http://mymirror:6000
    "postgres:9.5":
      environment: 
        POSTGRES_USER: postgres
        POSTGRES_PASSWORD: postgres 

What do you think about it?

Edited by 🤖 GitLab Bot 🤖