Skip to content

Add runtime docker agent template container option #1031

@mardjuro

Description

@mardjuro

What feature do you want to see added?

Container settings for Docker agent template on Jenkins cloud do not provide an option to specify which runtime should be used for the cloud container. Command line equivalent for this is using --runtime parameter when running docker container.

This seems to be one of the few options missing from the configuration. It is supported by docker-java project (HostConfig.withRuntime(String)), but not set in DockerTemplateBase.

Option to use docker command as launch method, per #468, gives a workaround which is not applicable for docker cloud within Jenkins, and requires non-trivial approach to run commands on agents.

Another workaround, which I'm currently using, is to set default runtime on a cloud machine level using configuration in /etc/docker/daemon.json.

{
 "default-runtime": "sysbox-runc",
}

Such approach has own disadvantages by using non-default runtime for all containers, even ones which prefer other runtimes. Example for this are containers / docker agent templates which use nvidia runtime.

Proposed solution
Add option for runtime selection on Container settings within docker cloud agent templates.

Upstream changes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA PR providing an enhancement to existing functionality.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions