Skip to content

Volume Mounting in GitFlic Runner with Docker Type

The Docker-type agent functionality allows configuring volume mounts for pipeline helper containers through registration parameters or via settings in the application.properties file.

The docker.volumes parameter supports bind mounts, named volumes, and anonymous volumes using syntax similar to Docker's -v flag. This enables different storage types, particularly useful for preserving state between container executions.

Example of bind and named volume mounts:

docker.volumes[0]=/local/path:/container/path
docker.volumes[1]=data:/container/path

The docker.volume-driver parameter specifies the volume driver (default: local for local filesystems). Alternative drivers like nfs for network storage can be configured to mount remote volumes. See Docker's official volume documentation for details.

The docker.volume_driver_ops parameter sets additional driver options. For NFS:

docker.volume-driver=nfs
docker.volume_driver_ops=type=nfs,addr=192.168.1.100,rw
docker.volumes[0]=/mnt/data:/container/data

For anonymous volumes with custom storage locations, use docker.cache_dir:

docker.cache_dir=/var/cache/gitflic-runner

The docker.disable_cache parameter (when true) disables local caching and prevents anonymous volume creation.

Container Volume Drivers

Additional drivers can be installed via Docker plugins. See Docker Engine plugins documentation for implementation details.

Automatic Translation!

This page has been translated using automated tools. The text may contain inaccuracies.