Docker volume plugin that automatically clones a specified Git repository into the volume.
5.1K
Automatically clones a Git repository into the volume on mount and removes it on unmount.
docker plugin install nerjs/gitvol
Create a volume by specifying a repository URL and (optionally) a tag or branch:
docker volume create -d nerjs/gitvol \
-o url=https://github.com/username/repository.git \
-o tag=v1.0.0 \
my-repo
Run a container with the volume:
docker run --rm -it -v my-repo:/data alpine ls -la /data
Remove the volume:
docker volume rm my-repo
version: "3.8"
services:
app:
image: alpine
command: ["ls", "-la", "/data"]
volumes:
- my-repo:/data
volumes:
my-repo:
driver: nerjs/gitvol
driver_opts:
url: https://github.com/nerjs/gitvol.git
# Choose ONE of the two lines below (or omit both). Tags are recommended.
# tag: v1.0.0
# branch: main
url (required) — Git-compatible repository URL. See Git URLs (now supported only http).
tag (optional) — checkout a specific tag (recommended).
branch (optional) — checkout a branch. Not recommended since branch contents may change between mounts.
tagandbranchare mutually exclusive.
Currently supported via embedding credentials into the URL, e.g.:
docker volume create -d nerjs/gitvol \
-o url=https://<github_pat_token>@github.com/nerjs/gitvol.git \
my-private-repo
For source code, issues, and updates see GitHub repository.
Content type
Plugin
Digest
sha256:64fcb7989…
Size
10.8 MB
Last updated
about 1 year ago
docker plugin install nerjs/gitvol