Skip to content

Respect Docker Runtime setting for services

networkException requested to merge networkException/gitlab-runner:main into main

What does this MR do?

This merge request includes the Runtime configuration value of the Docker executor in the HostConfig for a service.

Why was this MR needed?

Previously specifying a custom Runtime did not affect services. This didn't allow for sysbox to be used as an alternative to using priviliged containers for example (see the linked issue).

What's the best way to test this MR?

On a runner with a docker executor run the following pipeline

services:
    - name: ubuntu
      entrypoint: [ "sleep", "60" ]

job:
    script:
        - sleep 60

then get the id of the ubuntu container with docker ps and check if the runtime specified in the runner config got used using docker inspect <id> | jq ".[0].HostConfig.Runtime".

What are the relevant issue numbers?

Closes #27168 (closed)

Edited by Arran Walker

Merge request reports