Skip to content

FR: Extend services by additional parameters

Description

You provide great future to start services from .gitab-ci.yml file. With enhance support of private repositories it became more important.

But you only deduct service name from its URL. What if I need start two postgres instances? Or should provide additional arguments like aliases, volumes for service run? In my real case I have image which use systemd service in it to be closer to "reals server installation". To run it I must pass volume like: -v /sys/fs/cgroup:/sys/fs/cgroup:ro

Proposal

In https://gitlab.com/gitlab-org/gitlab-ce/issues/22305#possible-fixes I briefly suggest extend that syntax too, but it was bug, so I open that future request separately. Fore example syntax may be like:

services:
  - database:
      image: docreg.taskdata.work:5000/egaisdb:latest
      alias: db
      ports:
        - '5432:5432'
      pull: true
      volumes:
        - '/sys/fs/cgroup:/sys/fs/cgroup:ro'
  # Another service in current style define format for shortness and backward compatibility:
  - my.registry.tld:5000/namepace/image:tag

Links / references

I think you may look for syntax on ansible module docker_container. Or integrate with docker-compose. Support docker-compose integration will be awesome, at least partially.