Commit b46bfa0c authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'axil-docker-driver' into 'master'

Properly mention DOCKER_DRIVER in the docs

See merge request gitlab-org/gitlab!29563
parents 3b5a7799 48352065
...@@ -118,7 +118,7 @@ not without its own challenges: ...@@ -118,7 +118,7 @@ not without its own challenges:
instance of Docker engine so they won't conflict with each other. But this instance of Docker engine so they won't conflict with each other. But this
also means that jobs can be slower because there's no caching of layers. also means that jobs can be slower because there's no caching of layers.
- By default, Docker 17.09 and higher uses `--storage-driver overlay2` which is - By default, Docker 17.09 and higher uses `--storage-driver overlay2` which is
the recommended storage driver. See [Using the overlayfs driver](#using-the-overlayfs-driver) the recommended storage driver. See [Using the overlayfs driver](#use-the-overlayfs-driver)
for details. for details.
- Since the `docker:19.03.8-dind` container and the Runner container don't share their - Since the `docker:19.03.8-dind` container and the Runner container don't share their
root filesystem, the job's working directory can be used as a mount point for root filesystem, the job's working directory can be used as a mount point for
...@@ -448,7 +448,7 @@ The steps in the `script` section for the `build` stage can be summed up to: ...@@ -448,7 +448,7 @@ The steps in the `script` section for the `build` stage can be summed up to:
1. The last two commands push the tagged Docker images to the container registry 1. The last two commands push the tagged Docker images to the container registry
so that they may also be used as cache for subsequent builds. so that they may also be used as cache for subsequent builds.
## Using the OverlayFS driver ## Use the OverlayFS driver
NOTE: **Note:** NOTE: **Note:**
The shared Runners on GitLab.com use the `overlay2` driver by default. The shared Runners on GitLab.com use the `overlay2` driver by default.
...@@ -480,18 +480,22 @@ which can be avoided if a different driver is used, for example `overlay2`. ...@@ -480,18 +480,22 @@ which can be avoided if a different driver is used, for example `overlay2`.
overlay overlay
``` ```
### Use driver per project ### Use the OverlayFS driver per project
You can enable the driver for each project individually by editing the project's `.gitlab-ci.yml`: You can enable the driver for each project individually by using the `DOCKER_DRIVER`
environment [variable](../yaml/README.md#variables) in `.gitlab-ci.yml`:
```yaml ```yaml
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
``` ```
### Use driver for every project ### Use the OverlayFS driver for every project
To enable the driver for every project, you can set the environment variable for every build by adding `environment` in the `[[runners]]` section of `config.toml`: If you use your own [GitLab Runners](https://docs.gitlab.com/runner/), you
can enable the driver for every project by setting the `DOCKER_DRIVER`
environment variable in the
[`[[runners]]` section of `config.toml`](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section):
```toml ```toml
environment = ["DOCKER_DRIVER=overlay2"] environment = ["DOCKER_DRIVER=overlay2"]
...@@ -499,11 +503,9 @@ environment = ["DOCKER_DRIVER=overlay2"] ...@@ -499,11 +503,9 @@ environment = ["DOCKER_DRIVER=overlay2"]
If you're running multiple Runners you will have to modify all configuration files. If you're running multiple Runners you will have to modify all configuration files.
> **Notes:** NOTE: **Note:**
> Read more about the [Runner configuration](https://docs.gitlab.com/runner/configuration/)
> - More information about the Runner configuration is available in the [Runner documentation](https://docs.gitlab.com/runner/configuration/). and [using the OverlayFS storage driver](https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/).
> - For more information about using OverlayFS with Docker, you can read
> [Use the OverlayFS storage driver](https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/).
## Using the GitLab Container Registry ## Using the GitLab Container Registry
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment