-
由 Suzanne Selhorn 创作于
Because we don't want people using Docker
由 Suzanne Selhorn 创作于Because we don't want people using Docker
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:
- Use the automated setup script. Recommended.
- Follow the manual setup.
If you are not on macOS or Linux, follow the manual setup.
Automated setup
The automated setup script:
You can run the script with the --dry-run
flag to check the dependencies
that get installed with the script.
-
Download the setup script.
wget https://gitlab.com/gitlab-org/duo-workflow/duo-workflow-executor/-/raw/main/scripts/install-runtime
-
Run the script.
chmod +x install-runtime ./install-runtime
Manual setup
- Install a Docker container engine, such as Rancher Desktop.
- Set the Docker socket path and Docker settings in VS Code:
-
Open VS Code, then open the Command Palette:
- On macOS: Cmd + ,
- On Windows and Linux: Ctrl + ,
-
In the open Command Palette search for
settings.json
. -
Add a line to
settings.json
that defines the Docker socket path settinggitlab.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,
-
-