# Using Docker images
> 原文:[https://docs.gitlab.com/ee/ci/docker/using_docker_images.html](https://docs.gitlab.com/ee/ci/docker/using_docker_images.html)
* [Register Docker Runner](#register-docker-runner)
* [What is an image](#what-is-an-image)
* [What is a service](#what-is-a-service)
* [How services are linked to the job](#how-services-are-linked-to-the-job)
* [How the health check of services works](#how-the-health-check-of-services-works)
* [What services are not for](#what-services-are-not-for)
* [Accessing the services](#accessing-the-services)
* [Define `image` and `services` from `.gitlab-ci.yml`](#define-image-and-services-from-gitlab-ciyml)
* [Passing environment variables to services](#passing-environment-variables-to-services)
* [Extended Docker configuration options](#extended-docker-configuration-options)
* [Available settings for `image`](#available-settings-for-image)
* [Available settings for `services`](#available-settings-for-services)
* [Starting multiple services from the same image](#starting-multiple-services-from-the-same-image)
* [Setting a command for the service](#setting-a-command-for-the-service)
* [Overriding the entrypoint of an image](#overriding-the-entrypoint-of-an-image)
* [Define image and services in `config.toml`](#define-image-and-services-in-configtoml)
* [Define an image from a private Container Registry](#define-an-image-from-a-private-container-registry)
* [Requirements and limitations](#requirements-and-limitations)
* [Using statically-defined credentials](#using-statically-defined-credentials)
* [Determining your `DOCKER_AUTH_CONFIG` data](#determining-your-docker_auth_config-data)
* [Configuring a job](#configuring-a-job)
* [Configuring a Runner](#configuring-a-runner)
* [Using Credentials Store](#using-credentials-store)
* [Using Credential Helpers](#using-credential-helpers)
* [Configuring services](#configuring-services)
* [PostgreSQL service example](#postgresql-service-example)
* [MySQL service example](#mysql-service-example)
* [How Docker integration works](#how-docker-integration-works)
* [How to debug a job locally](#how-to-debug-a-job-locally)
# Using Docker images[](#using-docker-images "Permalink")
GitLab CI / CD 與[GitLab Runner](../runners/README.html)一起可以使用[Docker Engine](https://www.docker.com/)測試和構建任何應用程序.
Docker 是一個開源項目,它允許您使用預定義的映像在單個 Linux 實例中運行的獨立"容器"中運行應用程序. [Docker Hub](https://hub.docker.com/)具有豐富的預構建映像數據庫,可用于測試和構建您的應用程序.
與 GitLab CI / CD 一起使用時,Docker 使用[`.gitlab-ci.yml`](../yaml/README.html)設置的預定義映像在單獨的隔離容器中運行每個作業.
這使得擁有可以在您的工作站上運行的簡單且可復制的構建環境更加容易. 額外的好處是您可以測試稍后將在您的 Shell 中探索的所有命令,而不必在專用的 CI 服務器上對其進行測試.
## Register Docker Runner[](#register-docker-runner "Permalink")
要將 GitLab Runner 與 Docker 一起使用,您需要[注冊一個新的 Runner](https://docs.gitlab.com/runner/register/)以使用`docker` executor.
An example can be seen below. First we set up a temporary template to supply the services:
```
cat > /tmp/test-config.template.toml << EOF [[runners]]
[runners.docker]
[[runners.docker.services]]
name = "postgres:latest"
[[runners.docker.services]]
name = "mysql:latest" EOF
```
然后,我們使用剛剛創建的模板注冊跑步者:
```
sudo gitlab-runner register \
--url "https://gitlab.example.com/" \
--registration-token "PROJECT_REGISTRATION_TOKEN" \
--description "docker-ruby:2.6" \
--executor "docker" \
--template-config /tmp/test-config.template.toml \
--docker-image ruby:2.6
```
注冊的運行器將使用`ruby:2.6` Docker 映像,并將運行兩個服務`postgres:latest`和`mysql:latest` ,在構建過程中均可訪問這兩個服務.
## What is an image[](#what-is-an-image "Permalink")
`image`關鍵字是 Docker 執行程序將運行以執行 CI 任務的 Docker 映像的名稱.
默認情況下,執行程序僅從[Docker Hub](https://hub.docker.com/)提取圖像,但是可以通過設置[Docker 提取策略](https://docs.gitlab.com/runner/executors/docker.html)以允許使用本地映像在`gitlab-runner/config.toml`進行配置.
有關映像和 Docker Hub 的更多信息,請閱讀[Docker Fundamentals](https://s0docs0docker0com.icopy.site/engine/understanding-docker/)文檔.
## What is a service[](#what-is-a-service "Permalink")
`services`關鍵字僅定義在您的工作期間運行的另一個 Docker 映像,并鏈接到`image`關鍵字定義的 Docker 映像. 這樣,您就可以在構建期間訪問服務映像.
服務映像可以運行任何應用程序,但是最常見的用例是運行數據庫容器,例如`mysql` . 與每次安裝項目時都安裝`mysql`相比,使用現有映像并將其作為附加容器運行更容易,更快捷.
您不僅限于僅具有數據庫服務. 您可以將所需的服務添加到`.gitlab-ci.yml`或手動修改`config.toml` . 在[Docker Hub](https://hub.docker.com/)或您的私有 Container Registry 中找到的任何映像都可以用作服務.
服務繼承與 CI 容器本身相同的 DNS 服務器,搜索域和其他主機.
您可以在[CI 服務示例](../services/README.html)的相關文檔中看到一些廣泛使用的[服務示例](../services/README.html) .
### How services are linked to the job[](#how-services-are-linked-to-the-job "Permalink")
為了更好地了解容器鏈接的工作方式,請閱讀[將容器鏈接在一起](https://s0docs0docker0com.icopy.site/engine/userguide/networking/default_network/dockerlinks/) .
總而言之,如果將`mysql`作為服務添加到應用程序,則該映像將用于創建鏈接到作業容器的容器.
The service container for MySQL will be accessible under the hostname `mysql`. So, in order to access your database service you have to connect to the host named `mysql` instead of a socket or `localhost`. Read more in [accessing the services](#accessing-the-services).
### How the health check of services works[](#how-the-health-check-of-services-works "Permalink")
服務旨在提供可通過**網絡訪問的**附加功能. 它可能是一個數據庫,例如 MySQL 或 Redis,甚至是`docker:stable-dind` ,它允許您在 Docker 中使用 Docker. CI / CD 作業繼續進行并可以通過網絡進行訪問幾乎是任何事情.
為確保此方法有效,跑步者:
1. 檢查默認情況下哪些端口從容器中暴露出來.
2. 啟動一個特殊的容器,等待這些端口可訪問.
當檢查的第二階段失敗時(由于服務中沒有打開的端口,或者由于在超時之前服務未正確啟動且端口沒有響應),它會顯示警告: `*** WARNING: Service XYZ probably didn't start properly` .
在大多數情況下,它將影響作業,但是在某些情況下,即使打印了該警告,作業仍將成功. 例如:
* 發出警告后不久,該服務已啟動,并且該作業從一開始就沒有使用鏈接的服務. 在那種情況下,當作業需要訪問服務時,它可能已經在那里等待連接.
* 服務容器不提供任何網絡服務,但是它正在使用作業的目錄(所有服務都將作業目錄作為卷掛載在`/builds` ). 在這種情況下,服務將完成其工作,并且由于該工作未嘗試與其連接,因此它不會失敗.
### What services are not for[](#what-services-are-not-for "Permalink")
如前所述,此功能旨在提供**網絡可訪問的**服務. 數據庫是此類服務的最簡單示例.
**注意:**服務功能并非旨在且不會將已定義的`services`映像中的任何軟件添加到作業的容器中.
例如,如果您在作業中定義了以下`services` ,則腳本**無法**使用`php` , `node`或`go`命令,因此該作業將失敗:
```
job:
services:
- php:7
- node:latest
- golang:1.10
image: alpine:3.7
script:
- php -v
- node -v
- go version
```
如果你需要有`php` , `node`和`go`供你的腳本,你應該:
* 選擇一個包含所有必需工具的現有 Docker 映像.
* 創建您自己的 Docker 映像,它將包含所有必需的工具,并在您的工作中使用它.
### Accessing the services[](#accessing-the-services "Permalink")
假設您需要一個 Wordpress 實例來測試與應用程序的某些 API 集成.
然后,您可以在`.gitlab-ci.yml`使用例如[tutum / wordpress](https://hub.docker.com/r/tutum/wordpress/)圖像:
```
services:
- tutum/wordpress:latest
```
如果未[指定服務別名](#available-settings-for-services) ,則在運行作業時,將啟動`tutum/wordpress` ,您將可以從構建容器中使用以下兩個主機名訪問它:
* `tutum-wordpress`
* `tutum__wordpress`
**注意:**帶下劃線的主機名是 RFC 無效的,可能會導致第三方應用程序出現問題.
服務主機名的默認別名是根據以下規則從其映像名稱創建的:
* 冒號后一切( `:` )被剝離.
* 將斜杠( `/` )替換為雙下劃線( `__` ),并創建主別名.
* 斜杠( `/` )替換為單破折號( `-` ),并創建了輔助別名(需要 GitLab Runner v1.1.0 或更高版本).
要覆蓋默認行為,可以[指定服務別名](#available-settings-for-services) .
## Define `image` and `services` from `.gitlab-ci.yml`[](#define-image-and-services-from-gitlab-ciyml "Permalink")
您可以簡單地定義將用于所有作業的映像以及要在構建期間使用的服務列表:
```
default:
image: ruby:2.6
services:
- postgres:11.7
before_script:
- bundle install
test:
script:
- bundle exec rake spec
```
圖像名稱必須采用以下格式之一:
* `image: <image-name>` (同使用`<image-name>`與`latest`標簽)
* `image: <image-name>:<tag>`
* `image: <image-name>@<digest>`
還可以為每個作業定義不同的圖像和服務:
```
default:
before_script:
- bundle install
test:2.6:
image: ruby:2.6
services:
- postgres:11.7
script:
- bundle exec rake spec
test:2.7:
image: ruby:2.7
services:
- postgres:12.2
script:
- bundle exec rake spec
```
或者,您可以傳遞一些[擴展](#extended-docker-configuration-options)的`image`和`services` [配置選項](#extended-docker-configuration-options) :
```
default:
image:
name: ruby:2.6
entrypoint: ["/bin/bash"]
services:
- name: my-postgres:11.7
alias: db-postgres
entrypoint: ["/usr/local/bin/db-postgres"]
command: ["start"]
before_script:
- bundle install
test:
script:
- bundle exec rake spec
```
## Passing environment variables to services[](#passing-environment-variables-to-services "Permalink")
您還可以傳遞自定義環境[變量,](../variables/README.html)以直接在`.gitlab-ci.yml`文件中微調 Docker `images`和`services` . 有關更多信息,請參見[自定義環境變量.](../variables/README.html#gitlab-ciyml-defined-variables)
```
# The following variables will automatically be passed down to the Postgres container
# as well as the Ruby container and available within each.
variables:
HTTPS_PROXY: "https://10.1.1.1:8090"
HTTP_PROXY: "https://10.1.1.1:8090"
POSTGRES_DB: "my_custom_db"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "example"
PGDATA: "/var/lib/postgresql/data"
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --data-checksums"
services:
- name: postgres:11.7
alias: db
entrypoint: ["docker-entrypoint.sh"]
command: ["postgres"]
image:
name: ruby:2.6
entrypoint: ["/bin/bash"]
before_script:
- bundle install
test:
script:
- bundle exec rake spec
```
## Extended Docker configuration options[](#extended-docker-configuration-options "Permalink")
在 GitLab 和 GitLab Runner 9.4 中引入.
配置`image`或`services`條目時,可以使用字符串或地圖作為選項:
* 使用字符串作為選項時,它必須是要使用的映像的全名(如果要從 Docker Hub 以外的注冊表中下載映像,則應包括注冊表部分)
* 使用地圖作為選項時,它必須至少包含`name`選項,該名稱與用于字符串設置的圖像名稱相同
例如,以下兩個定義相等:
1. 使用字符串作為`image`和`services`的選項:
```
image: "registry.example.com/my/image:latest"
services:
- postgresql:9.4
- redis:latest
```
2. 使用地圖作為`image`和`services`的選項. 必須使用`image:name` :
```
image:
name: "registry.example.com/my/image:latest"
services:
- name: postgresql:9.4
- name: redis:latest
```
### Available settings for `image`[](#available-settings-for-image "Permalink")
在 GitLab 和 GitLab Runner 9.4 中引入.
| Setting | Required | GitLab 版本 | Description |
| --- | --- | --- | --- |
| `name` | 是的,當與任何其他選項一起使用時 | 9.4 | 應使用的圖像的全名. 如果需要,它應包含注冊表部分. |
| `entrypoint` | no | 9.4 | 應該作為容器的入口點執行的命令或腳本. 創建容器時,它將轉換為 Docker 的`--entrypoint`選項. 語法類似于[`Dockerfile`的`ENTRYPOINT`](https://s0docs0docker0com.icopy.site/engine/reference/builder/)指令,其中每個 shell 令牌是數組中的單獨字符串. |
### Available settings for `services`[](#available-settings-for-services "Permalink")
在 GitLab 和 GitLab Runner 9.4 中引入.
| Setting | Required | GitLab 版本 | Description |
| --- | --- | --- | --- |
| `name` | 是的,當與任何其他選項一起使用時 | 9.4 | Full name of the image that should be used. It should contain the Registry part if needed. |
| `entrypoint` | no | 9.4 | 應該作為容器的入口點執行的命令或腳本. 創建容器時,它將轉換為 Docker 的`--entrypoint`選項. 語法類似于[`Dockerfile`的`ENTRYPOINT`](https://s0docs0docker0com.icopy.site/engine/reference/builder/)指令,其中每個 shell 令牌是數組中的單獨字符串. |
| `command` | no | 9.4 | 應該用作容器命令的命令或腳本. 它將轉換為映像名稱后傳遞給 Docker 的參數. 語法類似于[`Dockerfile`的`CMD`](https://s0docs0docker0com.icopy.site/engine/reference/builder/)指令,其中每個 shell 令牌是數組中的單獨字符串. |
| `alias` | no | 9.4 | 可用于從作業的容器訪問服務的其他別名. 請閱讀[訪問服務](#accessing-the-services)以獲取更多信息. |
**注意:** GitLab Runner 12.8 [引入](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2229)了對 Kubernetes 執行器的別名支持,并且僅對 Kubernetes 1.7 或更高版本可用.
### Starting multiple services from the same image[](#starting-multiple-services-from-the-same-image "Permalink")
在 GitLab 和 GitLab Runner 9.4 中引入. 閱讀有關[擴展配置選項的](#extended-docker-configuration-options)更多信息.
在使用新的擴展 Docker 配置選項之前,以下配置將無法正常工作:
```
services:
- mysql:latest
- mysql:latest
```
The Runner would start two containers using the `mysql:latest` image, but both of them would be added to the job’s container with the `mysql` alias based on the [default hostname naming](#accessing-the-services). This would end with one of the services not being accessible.
在新的擴展 Docker 配置選項之后,以上示例將如下所示:
```
services:
- name: mysql:latest
alias: mysql-1
- name: mysql:latest
alias: mysql-2
```
Runner 仍將使用`mysql:latest`映像啟動兩個容器,但是現在每個容器也可以使用`.gitlab-ci.yml`文件中配置的別名進行訪問.
### Setting a command for the service[](#setting-a-command-for-the-service "Permalink")
在 GitLab 和 GitLab Runner 9.4 中引入. 閱讀有關[擴展配置選項的](#extended-docker-configuration-options)更多信息.
假設您有一個`super/sql:latest`映像,其中包含一些 SQL 數據庫,并且想將其用作您的工作服務. 我們還假設該映像在啟動容器時不會啟動數據庫進程,并且用戶需要手動使用`/usr/bin/super-sql run`作為命令來啟動數據庫.
在使用新的擴展 Docker 配置選項之前,您需要基于`super/sql:latest`映像創建自己的映像,添加默認命令,然后在作業的配置中使用它,例如:
```
# my-super-sql:latest image's Dockerfile
FROM super/sql:latest
CMD ["/usr/bin/super-sql", "run"]
```
```
# .gitlab-ci.yml
services:
- my-super-sql:latest
```
在新的擴展 Docker 配置選項之后,您現在可以簡單地在`.gitlab-ci.yml`設置`command` ,例如:
```
# .gitlab-ci.yml
services:
- name: super/sql:latest
command: ["/usr/bin/super-sql", "run"]
```
如您所見, `command`的語法類似于[Dockerfile 的`CMD`](https://s0docs0docker0com.icopy.site/engine/reference/builder/) .
### Overriding the entrypoint of an image[](#overriding-the-entrypoint-of-an-image "Permalink")
在 GitLab 和 GitLab Runner 9.4 中引入. 閱讀有關[擴展配置選項的](#extended-docker-configuration-options)更多信息.
在顯示可用的入口點覆蓋方法之前,讓我們簡要介紹一下 Runner 如何啟動以及如何將 Docker 映像用于 CI 作業中使用的容器:
1. Runner 使用定義的入口點啟動 Docker 容器( `Dockerfile`中的默認值,該文件可能會在`.gitlab-ci.yml`覆蓋)
2. 跑步者將自己附加到正在運行的容器上.
3. 跑步者準備一個腳本( [`before_script`](../yaml/README.html#before_script-and-after_script) , [`script`](../yaml/README.html#script)和[`after_script`](../yaml/README.html#before_script-and-after_script)的組合).
4. 運行程序將腳本發送到容器的外殼 STDIN 并接收輸出.
要覆蓋 Docker 映像的入口點,建議的解決方案是在`.gitlab-ci.yml`定義一個空`entrypoint` `.gitlab-ci.yml` ,以便 Runner 不會啟動無用的 shell 層. 但是,這不適用于所有 Docker 版本,因此您應檢查 Runner 使用的是哪個版本. 特別:
* 如果使用 Docker 17.06 或更高版本,則`entrypoint`可以設置為空值.
* 如果使用 Docker 17.03 或更早版本,則`entrypoint`可以設置為`/bin/sh -c` , `/bin/bash -c`或映像中可用的等效 shell.
`image:entrypoint`的語法類似于[Dockerfile 的`ENTRYPOINT`](https://s0docs0docker0com.icopy.site/engine/reference/builder/) .
假設您有一個`super/sql:experimental`映像,其中包含一些 SQL 數據庫,并且您想將其用作工作的基礎映像,因為您想使用此數據庫二進制文件執行一些測試. 我們還假設此映像是使用`/usr/bin/super-sql run`作為入口點配置的. 這意味著在啟動沒有其他選項的容器時,它將運行數據庫的進程,而 Runner 希望映像沒有入口點,或者入口點已準備好啟動 Shell 命令.
使用擴展的 Docker 配置選項,而不是基于`super/sql:experimental`創建自己的映像,將`ENTRYPOINT`設置為 shell,然后在 CI 作業中使用新映像,您現在只需在`.gitlab-ci.yml`定義一個`entrypoint` `.gitlab-ci.yml` .
**對于 Docker 17.06+:**
```
image:
name: super/sql:experimental
entrypoint: [""]
```
**對于 Docker = <17.03:**
```
image:
name: super/sql:experimental
entrypoint: ["/bin/sh", "-c"]
```
## Define image and services in `config.toml`[](#define-image-and-services-in-configtoml "Permalink")
查找`[runners.docker]`部分:
```
[runners.docker]
image = "ruby:latest"
services = ["mysql:latest", "postgres:latest"]
```
以這種方式定義的圖像和服務將添加到該運行程序運行的所有作業中.
## Define an image from a private Container Registry[](#define-an-image-from-a-private-container-registry "Permalink")
要訪問私有容器注冊表,GitLab Runner 進程可以使用:
* [靜態定義的憑證](#using-statically-defined-credentials) . 也就是說,特定注冊表的用戶名和密碼.
* [憑證存儲](#using-credentials-store) . 有關更多信息,請參閱[相關的 Docker 文檔](https://docs.docker.com/engine/reference/commandline/login/#credentials-store) .
* [憑證助手](#using-credential-helpers) . 有關更多信息,請參閱[相關的 Docker 文檔](https://docs.docker.com/engine/reference/commandline/login/#credential-helpers) .
為了定義應該使用哪個,GitLab Runner 進程按以下順序讀取配置:
* `DOCKER_AUTH_CONFIG`變量提供為:
* `.gitlab-ci.yml` [變量](../variables/README.html#gitlab-cicd-environment-variables) .
* 項目的變量存儲在項目的**"設置">" CI / CD"**頁面上.
* Runner 的`config.toml`中提供了`DOCKER_AUTH_CONFIG`變量作為環境變量.
* `config.json`文件放置在運行 GitLab Runner 進程的用戶的`$HOME/.docker`目錄中. 如果提供了`--user`標志以非特權用戶身份運行 GitLab Runner 子進程,則將使用 GitLab Runner 主進程用戶的主目錄.
**注意:** GitLab Runner **僅從** `config.toml`讀取此配置,并且如果它是作為環境變量提供的,則忽略它. 這是因為 GitLab Runner **僅**使用`config.toml`配置,并且不會在運行時內插**任何**環境變量.
### Requirements and limitations[](#requirements-and-limitations "Permalink")
* 此功能需要 GitLab Runner **1.8**或更高版本.
* 對于**> = 0.6,<1.8 的** GitLab Runner 版本**,**部分支持使用私有注冊表,這要求在運行者的主機上手動配置憑據. 如果要使用私人注冊表,建議將 Runner 至少升級到**1.8**版.
* 在 GitLab Runner 13.1 和更高版本中適用于[Kubernetes 執行器](https://docs.gitlab.com/runner/executors/kubernetes.html) .
### Using statically-defined credentials[](#using-statically-defined-credentials "Permalink")
您可以采用兩種方法來訪問私有注冊表. 兩者都需要使用適當的身份驗證信息設置環境變量`DOCKER_AUTH_CONFIG` .
1. 每個作業:要配置一個作業以訪問專用注冊表,請添加`DOCKER_AUTH_CONFIG`作為作業變量.
2. 每個運行者:要配置 Runner 以便其所有作業都可以訪問私有注冊表,請在 Runner 的配置中將`DOCKER_AUTH_CONFIG`添加到環境中.
請參閱下面的示例.
#### Determining your `DOCKER_AUTH_CONFIG` data[](#determining-your-docker_auth_config-data "Permalink")
例如,假設您要使用`registry.example.com:5000/private/image:latest`映像,該映像是私有映像,需要您登錄到私有容器注冊表.
我們還假設這些是登錄憑據:
| Key | Value |
| --- | --- |
| registry | `registry.example.com:5000` |
| username | `my_username` |
| password | `my_password` |
有兩種方法可以確定`DOCKER_AUTH_CONFIG`的值:
* **第一種方法-**在本地計算機上進行`docker login` :
```
docker login registry.example.com:5000 --username my_username --password my_password
```
然后復制`~/.docker/config.json` .
如果您不需要從計算機訪問注冊表,則可以執行`docker logout` :
```
docker logout registry.example.com:5000
```
* **第二種方式-**在某些設置中,Docker 客戶端可能會使用可用的系統密鑰存儲區來存儲`docker login`的結果. 在這種情況下,無法讀取`~/.docker/config.json` ,因此您將需要準備所需的`${username}:${password}` base64 編碼版本,并手動創建 Docker 配置 JSON. 打開一個終端并執行以下命令:
```
# Note the use of "-n" - it prevents encoding a newline in the password.
echo -n "my_username:my_password" | base64
# Example output to copy
bXlfdXNlcm5hbWU6bXlfcGFzc3dvcmQ=
```
創建 Docker JSON 配置內容,如下所示:
```
{ "auths": { "registry.example.com:5000": { "auth": "(Base64 content from above)" } } }
```
#### Configuring a job[](#configuring-a-job "Permalink")
要配置具有對`registry.example.com:5000`訪問權限的單個作業,請按照下列步驟操作:
1. 創建一個[變量](../variables/README.html#gitlab-cicd-environment-variables) `DOCKER_AUTH_CONFIG` ,并將 Docker 配置文件的內容作為值:
```
{ "auths": { "registry.example.com:5000": { "auth": "bXlfdXNlcm5hbWU6bXlfcGFzc3dvcmQ=" } } }
```
2. 現在,您可以使用`.gitlab-ci.yml`文件中`image`和/或`services`中定義的`registry.example.com:5000`任何私有圖像:
```
image: registry.example.com:5000/namespace/image:tag
```
在上面的例子,GitLab 轉輪會看`registry.example.com:5000`用于圖像`namespace/image:tag` .
您可以根據需要添加任意數量的注冊表配置,如上所述,將更多注冊表添加到`"auths"`哈希中.
**注意:** Runner 到處都需要完整的`hostname:port`組合,以使其與`DOCKER_AUTH_CONFIG`相匹配. 例如,如果`registry.example.com:5000/namespace/image:tag`中指定`.gitlab-ci.yml` ,則`DOCKER_AUTH_CONFIG`還必須指定`registry.example.com:5000` . 僅指定`registry.example.com`將不起作用.
### Configuring a Runner[](#configuring-a-runner "Permalink")
如果您有許多訪問同一注冊表的管道,最好在運行程序級別設置注冊表訪問. 這使管道作者僅通過在適當的運行程序上運行作業即可訪問私有注冊表. 這也使注冊表更改和憑據輪換更加簡單.
當然,這意味著該運行程序上的任何作業都可以使用相同的特權訪問注冊表,即使在整個項目中也是如此. 如果需要控制對注冊表的訪問,則需要確保控制對運行器的訪問.
要將`DOCKER_AUTH_CONFIG`添加到運行器:
1. 修改 Runner 的`config.toml`文件,如下所示:
```
[[runners]]
environment = ["DOCKER_AUTH_CONFIG={\"auths\":{\"registry.example.com:5000\":{\"auth\":\"bXlfdXNlcm5hbWU6bXlfcGFzc3dvcmQ=\"}}}"]
```
2. 重新啟動 Runner 服務.
**注意:** `DOCKER_AUTH_CONFIG`數據中包含的雙引號必須使用反斜杠轉義. 這樣可以防止將它們解釋為 TOML.**注意:** `environment`選項是一個列表. 因此,您的跑步者可能已有條目,您應該將其添加到列表中,而不是替換它.
### Using Credentials Store[](#using-credentials-store "Permalink")
> 在 GitLab Runner 9.5 中添加了對使用憑據存儲的支持.
要配置憑據存儲,請按照下列步驟操作:
1. 要使用憑據存儲,您需要一個外部幫助程序來與特定的鑰匙串或外部存儲進行交互. 確保 GitLab Runner `$PATH`有可用的幫助程序.
2. 使 GitLab Runner 使用它. 有兩種方法可以完成此操作. 要么:
* 創建一個[變量](../variables/README.html#gitlab-cicd-environment-variables) `DOCKER_AUTH_CONFIG` ,并將 Docker 配置文件的內容作為值:
```
{ "credsStore": "osxkeychain" }
```
* 或者,如果您正在運行自我管理的`${GITLAB_RUNNER_HOME}/.docker/config.json` ,請將上面的 JSON 添加到`${GITLAB_RUNNER_HOME}/.docker/config.json` . GitLab Runner 將讀取此配置文件,并將使用此特定存儲庫所需的幫助程序.
**注意:** `credsStore`用于訪問所有注冊表. 如果要同時使用私有注冊表中的映像和 DockerHub 中的公共映像,則從 DockerHub 提取將失敗,因為 Docker 守護程序將嘗試對**所有**注冊表使用相同的憑據.
### Using Credential Helpers[](#using-credential-helpers "Permalink")
> 在 GitLab Runner 12.0 中添加了對使用憑據助手的支持
作為示例,假設您要使用`aws_account_id.dkr.ecr.region.amazonaws.com/private/image:latest`映像,該映像是私有的,需要您登錄到私有容器注冊表.
要配置`aws_account_id.dkr.ecr.region.amazonaws.com`訪問`aws_account_id.dkr.ecr.region.amazonaws.com` ,請按照以下步驟操作:
1. 確保`docker-credential-ecr-login`在 GitLab Runner 的`$PATH`可用.
2. 具有以下任何[AWS 憑證設置](https://github.com/awslabs/amazon-ecr-credential-helper#aws-credentials) . 確保 GitLab Runner 可以訪問憑據.
3. 使 GitLab Runner 使用它. 有兩種方法可以完成此操作. 要么:
* 創建一個[變量](../variables/README.html#gitlab-cicd-environment-variables) `DOCKER_AUTH_CONFIG` ,并將 Docker 配置文件的內容作為值:
```
{ "credHelpers": { "aws_account_id.dkr.ecr.region.amazonaws.com": "ecr-login" } }
```
這會將 Docker 配置為對特定注冊表使用憑據幫助器.
or
```
{ "credsStore": "ecr-login" }
```
這會將 Docker 配置為對所有 Amazon ECR 注冊表使用憑證幫助器.
* 或者,如果您正在運行自我管理的`${GITLAB_RUNNER_HOME}/.docker/config.json` ,請將上面的 JSON 添加到`${GITLAB_RUNNER_HOME}/.docker/config.json` . GitLab Runner 將讀取此配置文件,并將使用此特定存儲庫所需的幫助程序.
4. 現在,您可以使用`.gitlab-ci.yml`文件中`image`和/或`services`中定義的`aws_account_id.dkr.ecr.region.amazonaws.com`任何私有圖像:
```
image: aws_account_id.dkr.ecr.region.amazonaws.com/private/image:latest
```
在上面的示例中,GitLab Runner 將查看`aws_account_id.dkr.ecr.region.amazonaws.com`中的圖像`private/image:latest` .
您可以根據需要添加`"credHelpers"`數量的注冊表配置,如上所述,將更多注冊表添加到`"credHelpers"`哈希中.
## Configuring services[](#configuring-services "Permalink")
許多服務接受環境變量,這些變量使您可以根據環境輕松更改數據庫名稱或設置帳戶名稱.
GitLab Runner 0.5.0 及更高版本將所有 YAML 定義的變量傳遞到創建的服務容器.
For all possible configuration variables check the documentation of each image provided in their corresponding Docker hub page.
**注意:**所有變量都將傳遞到所有服務容器. 它并非旨在區分哪個變量應該放在哪里.
### PostgreSQL service example[](#postgresql-service-example "Permalink")
請參閱有關將[PostgreSQL 用作服務](../services/postgres.html)的特定文檔.
### MySQL service example[](#mysql-service-example "Permalink")
請參閱有關將[MySQL 用作服務](../services/mysql.html)的特定文檔.
## How Docker integration works[](#how-docker-integration-works "Permalink")
以下是 Docker 在作業期間執行的步驟的高級概述.
1. 創建任何服務容器: `mysql` , `postgresql` , `mongodb` , `redis` .
2. 創建緩存容器以存儲`config.toml`和構建映像的`Dockerfile`中定義的所有卷(如上例中的`ruby:2.6` ).
3. 創建構建容器并將任何服務容器鏈接到構建容器.
4. 啟動構建容器并將作業腳本發送到該容器.
5. 運行作業腳本.
6. 檢出代碼: `/builds/group-name/project-name/` .
7. 運行`.gitlab-ci.yml`定義的任何步驟.
8. 檢查構建腳本的退出狀態.
9. 刪除構建容器和所有創建的服務容器.
## How to debug a job locally[](#how-to-debug-a-job-locally "Permalink")
**注意:**以下命令在沒有 root 特權的情況下運行. 您應該能夠使用常規用戶帳戶運行 Docker.
首先從創建一個名為`build_script`的文件`build_script` :
```
cat <<EOF > build_script
git clone https://gitlab.com/gitlab-org/gitlab-runner.git /builds/gitlab-org/gitlab-runner
cd /builds/gitlab-org/gitlab-runner
make EOF
```
在這里,我們以包含 Makefile 的 GitLab Runner 存儲庫為例,因此運行`make`將執行 Makefile 中定義的命令. 您的里程可能會有所不同,所以不是`make`你可以運行它是特定于項目的命令.
然后創建一些服務容器:
```
docker run -d --name service-mysql mysql:latest
docker run -d --name service-postgres postgres:latest
```
這將創建兩個服務容器,分別名為`service-mysql`和`service-postgres` ,它們分別使用最新的 MySQL 和 PostgreSQL 映像. 它們都將在后臺( `-d` )運行.
最后,通過執行我們之前創建的`build_script`文件來創建構建容器:
```
docker run --name build -i --link=service-mysql:mysql --link=service-postgres:postgres ruby:2.6 /bin/bash < build_script
```
上面的命令將創建一個名為`build`的容器,該容器是從`ruby:2.6`鏡像派生的,并且有兩個鏈接到它的服務. 使用 STDIN 將`build_script`通過管道傳輸到 bash 解釋器,然后 bash 解釋器將在`build`容器中執行`build_script` .
完成測試后,不再需要這些容器時,可以使用以下方法刪除它們:
```
docker rm -f -v build service-mysql service-postgres
```
這將強制( `-f` )刪除`build`容器,兩個服務容器以及隨容器創建而創建的所有卷( `-v` ).
- GitLab Docs
- Installation
- Requirements
- GitLab cloud native Helm Chart
- Install GitLab with Docker
- Installation from source
- Install GitLab on Microsoft Azure
- Installing GitLab on Google Cloud Platform
- Installing GitLab on Amazon Web Services (AWS)
- Analytics
- Code Review Analytics
- Productivity Analytics
- Value Stream Analytics
- Kubernetes clusters
- Adding and removing Kubernetes clusters
- Adding EKS clusters
- Adding GKE clusters
- Group-level Kubernetes clusters
- Instance-level Kubernetes clusters
- Canary Deployments
- Cluster Environments
- Deploy Boards
- GitLab Managed Apps
- Crossplane configuration
- Cluster management project (alpha)
- Kubernetes Logs
- Runbooks
- Serverless
- Deploying AWS Lambda function using GitLab CI/CD
- Securing your deployed applications
- Groups
- Contribution Analytics
- Custom group-level project templates
- Epics
- Manage epics
- Group Import/Export
- Insights
- Issues Analytics
- Iterations
- Public access
- SAML SSO for GitLab.com groups
- SCIM provisioning using SAML SSO for GitLab.com groups
- Subgroups
- Roadmap
- Projects
- GitLab Secure
- Security Configuration
- Container Scanning
- Dependency Scanning
- Dependency List
- Static Application Security Testing (SAST)
- Secret Detection
- Dynamic Application Security Testing (DAST)
- GitLab Security Dashboard
- Offline environments
- Standalone Vulnerability pages
- Security scanner integration
- Badges
- Bulk editing issues and merge requests at the project level
- Code Owners
- Compliance
- License Compliance
- Compliance Dashboard
- Create a project
- Description templates
- Deploy Keys
- Deploy Tokens
- File finder
- Project integrations
- Integrations
- Atlassian Bamboo CI Service
- Bugzilla Service
- Custom Issue Tracker service
- Discord Notifications service
- Enabling emails on push
- GitHub project integration
- Hangouts Chat service
- Atlassian HipChat
- Irker IRC Gateway
- GitLab Jira integration
- Mattermost Notifications Service
- Mattermost slash commands
- Microsoft Teams service
- Mock CI Service
- Prometheus integration
- Redmine Service
- Slack Notifications Service
- Slack slash commands
- GitLab Slack application
- Webhooks
- YouTrack Service
- Insights
- Issues
- Crosslinking Issues
- Design Management
- Confidential issues
- Due dates
- Issue Boards
- Issue Data and Actions
- Labels
- Managing issues
- Milestones
- Multiple Assignees for Issues
- Related issues
- Service Desk
- Sorting and ordering issue lists
- Issue weight
- Associate a Zoom meeting with an issue
- Merge requests
- Allow collaboration on merge requests across forks
- Merge Request Approvals
- Browser Performance Testing
- How to create a merge request
- Cherry-pick changes
- Code Quality
- Load Performance Testing
- Merge Request dependencies
- Fast-forward merge requests
- Merge when pipeline succeeds
- Merge request conflict resolution
- Reverting changes
- Reviewing and managing merge requests
- Squash and merge
- Merge requests versions
- Draft merge requests
- Members of a project
- Migrating projects to a GitLab instance
- Import your project from Bitbucket Cloud to GitLab
- Import your project from Bitbucket Server to GitLab
- Migrating from ClearCase
- Migrating from CVS
- Import your project from FogBugz to GitLab
- Gemnasium
- Import your project from GitHub to GitLab
- Project importing from GitLab.com to your private GitLab instance
- Import your project from Gitea to GitLab
- Import your Jira project issues to GitLab
- Migrating from Perforce Helix
- Import Phabricator tasks into a GitLab project
- Import multiple repositories by uploading a manifest file
- Import project from repo by URL
- Migrating from SVN to GitLab
- Migrating from TFVC to Git
- Push Options
- Releases
- Repository
- Branches
- Git Attributes
- File Locking
- Git file blame
- Git file history
- Repository mirroring
- Protected branches
- Protected tags
- Push Rules
- Reduce repository size
- Signing commits with GPG
- Syntax Highlighting
- GitLab Web Editor
- Web IDE
- Requirements Management
- Project settings
- Project import/export
- Project access tokens (Alpha)
- Share Projects with other Groups
- Snippets
- Static Site Editor
- Wiki
- Project operations
- Monitor metrics for your CI/CD environment
- Set up alerts for Prometheus metrics
- Embedding metric charts within GitLab-flavored Markdown
- Embedding Grafana charts
- Using the Metrics Dashboard
- Dashboard YAML properties
- Metrics dashboard settings
- Panel types for dashboards
- Using Variables
- Templating variables for metrics dashboards
- Prometheus Metrics library
- Monitoring AWS Resources
- Monitoring HAProxy
- Monitoring Kubernetes
- Monitoring NGINX
- Monitoring NGINX Ingress Controller
- Monitoring NGINX Ingress Controller with VTS metrics
- Alert Management
- Error Tracking
- Tracing
- Incident Management
- GitLab Status Page
- Feature Flags
- GitLab CI/CD
- GitLab CI/CD pipeline configuration reference
- GitLab CI/CD include examples
- Introduction to CI/CD with GitLab
- Getting started with GitLab CI/CD
- How to enable or disable GitLab CI/CD
- Using SSH keys with GitLab CI/CD
- Migrating from CircleCI
- Migrating from Jenkins
- Auto DevOps
- Getting started with Auto DevOps
- Requirements for Auto DevOps
- Customizing Auto DevOps
- Stages of Auto DevOps
- Upgrading PostgreSQL for Auto DevOps
- Cache dependencies in GitLab CI/CD
- GitLab ChatOps
- Cloud deployment
- Docker integration
- Building Docker images with GitLab CI/CD
- Using Docker images
- Building images with kaniko and GitLab CI/CD
- GitLab CI/CD environment variables
- Predefined environment variables reference
- Where variables can be used
- Deprecated GitLab CI/CD variables
- Environments and deployments
- Protected Environments
- GitLab CI/CD Examples
- Test a Clojure application with GitLab CI/CD
- Using Dpl as deployment tool
- Testing a Phoenix application with GitLab CI/CD
- End-to-end testing with GitLab CI/CD and WebdriverIO
- DevOps and Game Dev with GitLab CI/CD
- Deploy a Spring Boot application to Cloud Foundry with GitLab CI/CD
- How to deploy Maven projects to Artifactory with GitLab CI/CD
- Testing PHP projects
- Running Composer and NPM scripts with deployment via SCP in GitLab CI/CD
- Test and deploy Laravel applications with GitLab CI/CD and Envoy
- Test and deploy a Python application with GitLab CI/CD
- Test and deploy a Ruby application with GitLab CI/CD
- Test and deploy a Scala application to Heroku
- GitLab CI/CD for external repositories
- Using GitLab CI/CD with a Bitbucket Cloud repository
- Using GitLab CI/CD with a GitHub repository
- GitLab Pages
- GitLab Pages
- GitLab Pages domain names, URLs, and baseurls
- Create a GitLab Pages website from scratch
- Custom domains and SSL/TLS Certificates
- GitLab Pages integration with Let's Encrypt
- GitLab Pages Access Control
- Exploring GitLab Pages
- Incremental Rollouts with GitLab CI/CD
- Interactive Web Terminals
- Optimizing GitLab for large repositories
- Metrics Reports
- CI/CD pipelines
- Pipeline Architecture
- Directed Acyclic Graph
- Multi-project pipelines
- Parent-child pipelines
- Pipelines for Merge Requests
- Pipelines for Merged Results
- Merge Trains
- Job artifacts
- Pipeline schedules
- Pipeline settings
- Triggering pipelines through the API
- Review Apps
- Configuring GitLab Runners
- GitLab CI services examples
- Using MySQL
- Using PostgreSQL
- Using Redis
- Troubleshooting CI/CD
- GitLab Package Registry
- GitLab Container Registry
- Dependency Proxy
- GitLab Composer Repository
- GitLab Conan Repository
- GitLab Maven Repository
- GitLab NPM Registry
- GitLab NuGet Repository
- GitLab PyPi Repository
- API Docs
- API resources
- .gitignore API
- GitLab CI YMLs API
- Group and project access requests API
- Appearance API
- Applications API
- Audit Events API
- Avatar API
- Award Emoji API
- Project badges API
- Group badges API
- Branches API
- Broadcast Messages API
- Project clusters API
- Group clusters API
- Instance clusters API
- Commits API
- Container Registry API
- Custom Attributes API
- Dashboard annotations API
- Dependencies API
- Deploy Keys API
- Deployments API
- Discussions API
- Dockerfiles API
- Environments API
- Epics API
- Events
- Feature Flags API
- Feature flag user lists API
- Freeze Periods API
- Geo Nodes API
- Group Activity Analytics API
- Groups API
- Import API
- Issue Boards API
- Group Issue Boards API
- Issues API
- Epic Issues API
- Issues Statistics API
- Jobs API
- Keys API
- Labels API
- Group Labels API
- License
- Licenses API
- Issue links API
- Epic Links API
- Managed Licenses API
- Markdown API
- Group and project members API
- Merge request approvals API
- Merge requests API
- Project milestones API
- Group milestones API
- Namespaces API
- Notes API
- Notification settings API
- Packages API
- Pages domains API
- Pipeline schedules API
- Pipeline triggers API
- Pipelines API
- Project Aliases API
- Project import/export API
- Project repository storage moves API
- Project statistics API
- Project templates API
- Projects API
- Protected branches API
- Protected tags API
- Releases API
- Release links API
- Repositories API
- Repository files API
- Repository submodules API
- Resource label events API
- Resource milestone events API
- Resource weight events API
- Runners API
- SCIM API
- Search API
- Services API
- Application settings API
- Sidekiq Metrics API
- Snippets API
- Project snippets
- Application statistics API
- Suggest Changes API
- System hooks API
- Tags API
- Todos API
- Users API
- Project-level Variables API
- Group-level Variables API
- Version API
- Vulnerabilities API
- Vulnerability Findings API
- Wikis API
- GraphQL API
- Getting started with GitLab GraphQL API
- GraphQL API Resources
- API V3 to API V4
- Validate the .gitlab-ci.yml (API)
- User Docs
- Abuse reports
- User account
- Active sessions
- Deleting a User account
- Permissions
- Personal access tokens
- Profile preferences
- Threads
- GitLab and SSH keys
- GitLab integrations
- Git
- GitLab.com settings
- Infrastructure as code with Terraform and GitLab
- GitLab keyboard shortcuts
- GitLab Markdown
- AsciiDoc
- GitLab Notification Emails
- GitLab Quick Actions
- Autocomplete characters
- Reserved project and group names
- Search through GitLab
- Advanced Global Search
- Advanced Syntax Search
- Time Tracking
- GitLab To-Do List
- Administrator Docs
- Reference architectures
- Reference architecture: up to 1,000 users
- Reference architecture: up to 2,000 users
- Reference architecture: up to 3,000 users
- Reference architecture: up to 5,000 users
- Reference architecture: up to 10,000 users
- Reference architecture: up to 25,000 users
- Reference architecture: up to 50,000 users
- Troubleshooting a reference architecture set up
- Working with the bundled Consul service
- Configuring PostgreSQL for scaling
- Configuring GitLab application (Rails)
- Load Balancer for multi-node GitLab
- Configuring a Monitoring node for Scaling and High Availability
- NFS
- Working with the bundled PgBouncer service
- Configuring Redis for scaling
- Configuring Sidekiq
- Admin Area settings
- Continuous Integration and Deployment Admin settings
- Custom instance-level project templates
- Diff limits administration
- Enable and disable GitLab features deployed behind feature flags
- Geo nodes Admin Area
- GitLab Pages administration
- Health Check
- Job logs
- Labels administration
- Log system
- PlantUML & GitLab
- Repository checks
- Repository storage paths
- Repository storage types
- Account and limit settings
- Service templates
- System hooks
- Changing your time zone
- Uploads administration
- Abuse reports
- Activating and deactivating users
- Audit Events
- Blocking and unblocking users
- Broadcast Messages
- Elasticsearch integration
- Gitaly
- Gitaly Cluster
- Gitaly reference
- Monitoring GitLab
- Monitoring GitLab with Prometheus
- Performance Bar
- Usage statistics
- Object Storage
- Performing Operations in GitLab
- Cleaning up stale Redis sessions
- Fast lookup of authorized SSH keys in the database
- Filesystem Performance Benchmarking
- Moving repositories managed by GitLab
- Run multiple Sidekiq processes
- Sidekiq MemoryKiller
- Switching to Puma
- Understanding Unicorn and unicorn-worker-killer
- User lookup via OpenSSH's AuthorizedPrincipalsCommand
- GitLab Package Registry administration
- GitLab Container Registry administration
- Replication (Geo)
- Geo database replication
- Geo with external PostgreSQL instances
- Geo configuration
- Using a Geo Server
- Updating the Geo nodes
- Geo with Object storage
- Docker Registry for a secondary node
- Geo for multiple nodes
- Geo security review (Q&A)
- Location-aware Git remote URL with AWS Route53
- Tuning Geo
- Removing secondary Geo nodes
- Geo data types support
- Geo Frequently Asked Questions
- Geo Troubleshooting
- Geo validation tests
- Disaster Recovery (Geo)
- Disaster recovery for planned failover
- Bring a demoted primary node back online
- Automatic background verification
- Rake tasks
- Back up and restore GitLab
- Clean up
- Namespaces
- Maintenance Rake tasks
- Geo Rake Tasks
- GitHub import
- Import bare repositories
- Integrity check Rake task
- LDAP Rake tasks
- Listing repository directories
- Praefect Rake tasks
- Project import/export administration
- Repository storage Rake tasks
- Generate sample Prometheus data
- Uploads migrate Rake tasks
- Uploads sanitize Rake tasks
- User management
- Webhooks administration
- X.509 signatures
- Server hooks
- Static objects external storage
- Updating GitLab
- GitLab release and maintenance policy
- Security
- Password Storage
- Custom password length limits
- Restrict allowed SSH key technologies and minimum length
- Rate limits
- Webhooks and insecure internal web services
- Information exclusivity
- How to reset your root password
- How to unlock a locked user from the command line
- User File Uploads
- How we manage the TLS protocol CRIME vulnerability
- User email confirmation at sign-up
- Security of running jobs
- Proxying assets
- CI/CD Environment Variables
- Contributor and Development Docs
- Contribute to GitLab
- Community members & roles
- Implement design & UI elements
- Issues workflow
- Merge requests workflow
- Code Review Guidelines
- Style guides
- GitLab Architecture Overview
- CI/CD development documentation
- Database guides
- Database Review Guidelines
- Database Review Guidelines
- Migration Style Guide
- What requires downtime?
- Understanding EXPLAIN plans
- Rake tasks for developers
- Mass inserting Rails models
- GitLab Documentation guidelines
- Documentation Style Guide
- Documentation structure and template
- Documentation process
- Documentation site architecture
- Global navigation
- GitLab Docs monthly release process
- Telemetry Guide
- Usage Ping Guide
- Snowplow Guide
- Experiment Guide
- Feature flags in development of GitLab
- Feature flags process
- Developing with feature flags
- Feature flag controls
- Document features deployed behind feature flags
- Frontend Development Guidelines
- Accessibility & Readability
- Ajax
- Architecture
- Axios
- Design Patterns
- Frontend Development Process
- DropLab
- Emojis
- Filter
- Frontend FAQ
- GraphQL
- Icons and SVG Illustrations
- InputSetter
- Performance
- Principles
- Security
- Tooling
- Vuex
- Vue
- Geo (development)
- Geo self-service framework (alpha)
- Gitaly developers guide
- GitLab development style guides
- API style guide
- Go standards and style guidelines
- GraphQL API style guide
- Guidelines for shell commands in the GitLab codebase
- HTML style guide
- JavaScript style guide
- Migration Style Guide
- Newlines style guide
- Python Development Guidelines
- SCSS style guide
- Shell scripting standards and style guidelines
- Sidekiq debugging
- Sidekiq Style Guide
- SQL Query Guidelines
- Vue.js style guide
- Instrumenting Ruby code
- Testing standards and style guidelines
- Flaky tests
- Frontend testing standards and style guidelines
- GitLab tests in the Continuous Integration (CI) context
- Review Apps
- Smoke Tests
- Testing best practices
- Testing levels
- Testing Rails migrations at GitLab
- Testing Rake tasks
- End-to-end Testing
- Beginner's guide to writing end-to-end tests
- End-to-end testing Best Practices
- Dynamic Element Validation
- Flows in GitLab QA
- Page objects in GitLab QA
- Resource class in GitLab QA
- Style guide for writing end-to-end tests
- Testing with feature flags
- Translate GitLab to your language
- Internationalization for GitLab
- Translating GitLab
- Proofread Translations
- Merging translations from CrowdIn
- Value Stream Analytics development guide
- GitLab subscription
- Activate GitLab EE with a license