Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gitlab-runner gitlab-runner
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,506
    • Issues 2,506
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • gitlab-runnergitlab-runner
  • Issues
  • #6404
Closed
Open
Issue created Jan 22, 2020 by Steve Azzopardi@steveazzMaintainer

Remove support for --docker-services flag on register command

Overview

In !1673 (merged) we introduced a new config structure for Docker services, and in #4922 (closed) we are removing support for the old structure. With this removal of the old structure --docker-services will also be removed. Meaning if you have gitlab-runner register --docker-services postgres it will no longer set the service. This is because the configuration is not longer an array for strings, but it's an array of structs and continues to have support for this flag will be confusing which field you are setting.

We've discussed this in detail in !1776 (comment 274656137)

Migration

If you have any automation around this, the best way to migrate away from this is to use configuration templates where you define the services in the template and use it, for example:

cat > /tmp/test-config.template.toml << EOF
[[runners]]
  [runners.docker]
    [[runners.docker.services]]
      name = "postgres"
EOF
sudo gitlab-runner register \
     --template-config /tmp/test-config.template.toml \
     --non-interactive \
     --url https://gitlab.com \
     --registration-token __REDACTED__ \
     --name test-runner \
     --docker-image alpine:3.11
     --executor docker \
Edited May 08, 2020 by Pedro Pombeiro
Assignee
Assign to
Time tracking