Container Usage

image version docker stars docker pulls

For easy and quickly usage you can use the Dockerfile from Dockerhub.

docker pull nolte/gitlab-bulkcheckout:latest

For wrapping the tool, and checkout to your local FS it is required that you define some additional Container Run Parameters.

execute checkout
docker run -it \
  --user=${UID}:$(id -g $(whoami)) \
  -v ${SSH_AUTH_SOCK}:/ssh-agent \
  -e SSH_AUTH_SOCK=/ssh-agent \
  -e GROUPS_MAPPINGS=/app/gitlab_groupMapping.yml \
  -e GITLAB_TOKEN=$(pass /internet/gitlab.com/tokens/management) \
  -e PROJECTS_BASE=/tmp/bulkcheckout \
  -w /tmp/bulkcheckout \
  -v /tmp/bulkcheckout:/tmp/bulkcheckout \
  -v ${HOME}/.ssh:/home/builder/.ssh:ro \
  -v ${PWD}/gitlab_groupMapping.yml:/app/gitlab_groupMapping.yml:ro \
  nolte/gitlab-bulkcheckout -v checkoutbulk

Container Run Parameters

--user ${UID}:$(id -g $(whoami))
The Container User will mapped to your user and group from the Host System, see User.
-v $SSH_AUTH_SOCK (optional)
Required for forward the User SSH Agent from the Host System to the container.
-e SSH_AUTH_SOCK (optional)
see -v $SSH_AUTH_SOCK
-e GROUPS_MAPPINGS
The Path to the checkout config (see: gitlab_bulkcheckout, Config Volume, Config,)
-e GITLAB_TOKEN
Gitlab Access Token for using the Gitlab API (see: gitlab_bulkcheckout) This example use the Commandline Tool pass for manage this secret.
-e PROJECTS_BASE
The Local Checkout Location, this path should be mapped to your Host System, (see: gitlab_bulkcheckout).
-w /tmp/bulkcheckout
The Container Workingdir.
-v /tmp/bulkcheckout:/tmp/bulkcheckout
Some Folder mounted to your Host System, used as checkout Base.
-v ${HOME}/.ssh:/home/builder/.ssh:ro
Mount your local SSH folder, for checkout the repositories over ssh.
-v ${PWD}/gitlab_groupMapping.yml:/app/gitlab_groupMapping.yml:ro
The Used config file (see: Config)