Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTeresa e Junior <teresaejunior@gmail.com>2017-12-21 09:38:17 +0300
committerTeresa e Junior <teresaejunior@gmail.com>2017-12-21 09:38:17 +0300
commitb6e37978bcc595d5336d09c8e0bbb854fbb7cf14 (patch)
tree7c07fee1ba73700da470981a64160c2cd3cbd8ad /doc
parent5d8d72f18e9329978987fcb046467ceacd13c3ab (diff)
Document mounting volumes with Docker-in-Docker
Diffstat (limited to 'doc')
-rw-r--r--doc/ci/docker/using_docker_build.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/ci/docker/using_docker_build.md b/doc/ci/docker/using_docker_build.md
index 0a2419b7ed2..22afcb9199d 100644
--- a/doc/ci/docker/using_docker_build.md
+++ b/doc/ci/docker/using_docker_build.md
@@ -164,6 +164,21 @@ not without its own challenges:
- By default, `docker:dind` uses `--storage-driver vfs` which is the slowest
form offered. To use a different driver, see
[Using the overlayfs driver](#using-the-overlayfs-driver).
+- Since the `docker: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
+ children containers. For example, if you have files you want to share with a
+ child container, you may create a subdirectory under `/builds/$CI_PROJECT_PATH`
+ and use it as your mount point (for a more thorough explanation, check [issue
+ #41227](https://gitlab.com/gitlab-org/gitlab-ce/issues/41227)):
+
+ ```yaml
+ variables:
+ MOUNT_POINT: /builds/$CI_PROJECT_PATH/mnt
+
+ script:
+ - mkdir -p "$MOUNT_POINT"
+ - docker run -v "$MOUNT_POINT:/mnt" my-docker-image
+ ```
An example project using this approach can be found here: https://gitlab.com/gitlab-examples/docker.