Skip to content
代码片段 群组 项目
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
stage: AI-powered
group: Duo Workflow
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
title: Set up Docker for GitLab Duo Workflow (optional)

{{< details >}}

  • Tier: Ultimate
  • Offering: GitLab.com
  • Status: Experiment

{{< /details >}}

{{< alert type="warning" >}}

This feature is considered experimental and is not intended for customer usage outside of initial design partners. We expect major changes to this feature.

{{< /alert >}}

Use the following guide to set up GitLab Duo Workflow with Docker.

This is not the preferred method to run Workflow. If you have VS Code and at least version 5.16.0 of the GitLab Workflow extension for VS Code, you can use Workflow. For more information, see the prerequisites.

Install Docker and set the socket file path

Workflow needs an execution platform like Docker where it can execute arbitrary code, read and write files, and make API calls to GitLab.

If you are on macOS or Linux, you can either:

If you are not on macOS or Linux, follow the manual setup.

Automated setup

The automated setup script:

  • Installs Docker and Colima.
  • Sets Docker socket path in VS Code settings.

You can run the script with the --dry-run flag to check the dependencies that get installed with the script.

  1. Download the setup script.

    wget https://gitlab.com/gitlab-org/duo-workflow/duo-workflow-executor/-/raw/main/scripts/install-runtime
  2. Run the script.

    chmod +x install-runtime
    ./install-runtime

Manual setup

  1. Install a Docker container engine, such as Rancher Desktop.
  2. Set the Docker socket path and Docker settings in VS Code:
    1. Open VS Code, then open the Command Palette:

      • On macOS: Cmd + ,
      • On Windows and Linux: Ctrl + ,
    2. In the open Command Palette search for settings.json.

    3. Add a line to settings.json that defines the Docker socket path setting gitlab.duoWorkflow.dockerSocket, according to your container manager, and save your settings file. Some examples for common container managers on macOS, where you would replace <your_user> with your user's home folder:

      • Rancher Desktop:

        "gitlab.duoWorkflow.dockerSocket": "/Users/<your_user>/.rd/docker.sock",
        "gitlab.duoWorkflow.useDocker": true,
      • Colima:

        "gitlab.duoWorkflow.dockerSocket": "/Users/<your_user>/.colima/default/docker.sock",
        "gitlab.duoWorkflow.useDocker": true,