Skip to content
GitLab Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Menu
    Projects Groups Snippets
  • Sign up now
  • Login
  • 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,410
    • Issues 2,410
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 128
    • Merge requests 128
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & 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.org
  • gitlab-runnergitlab-runner
  • Issues
  • #6404
Closed
Open
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