Copyright 2015 Hewlett Packard Enterprise Development Company, L.P.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
Verigreen on Docker
To run a Verigreen Collector container issue the following command from the command line:
The collector can be run as a daemon. Please see below service script, located within the Verigreen code-base:
docker run -it -v /path/to/ssh/assets:/ssh -v /path/to/verigreen/config:/vg -p 8085:8080 verigreen/verigreen
Please note that the
-it will run the container with an interactive shell, if you wish to run it as a daemon, replace the
Once the collector is up, you may access the collector web UI from your host at
Mapping an existing local git repository
docker run command assumes that you are cloning a fresh local copy of the git remote repository within the container's file system. However, if you map an existing local git repository from the host, the setup script for the container will assume that you want to use that local repository (and the remote repository that should be configured with it) to perform all its commands. Here is an example that maps a local repository in the host where the container is running:
docker run -it -v /path/to/ssh/assets:/ssh -v /path/to/verigreen/config:/vg -v /path/to/my/hosts/repo:/repo -p 8085:8080 verigreen/verigreen
/vg volumes is required. The minimal contents of those volumes are:
/vgshould have a
verigreenwill use as a configuration file (example here) and a
run.ymlfile that is used during container setup that should look something like this:
# /vg/run.yml repository: remote_url: "ssh://<domain>:<port>/path/to/repo.git"
/sshshould contain the configuration and keys for Verigreen to be able to communicate with the git remote repository. The files that are mapped here are copied from
/root/.ssh. This had to be done this way to avoid the pitfalls of running this container in a Windows environment that does not provide a mechanism for changing file permissions and therefore failing to access the ssh assets within the container running o
boot2docker. The files that are expected are the following:
/ssh/id_rsawhich is the private key file for the remote repository you are trying to protect.
/ssh/id_rsa.pubwhich is the public key for the remote repository you are trying to protect.
/ssh/configfile that configures
sshto use the above-mentioned keys when accessing the right domain. For example for domain
myuseryou could have a
configfile that looks like this:
# /root/.ssh/config Host my.example.com User myuser IdentityFile ~/.ssh/id_rsa
/ssh/known_hosts(optional). When specified, it should contain the public key for the git server (e.g. Atlassian Stash) which hosts the git remote repository. When not specified, this container provides a
run.shscript that will attempt to retrieve the key by using the value for
/repo(optional) is the location within the container that is expected, by convention, to hold the local git repository that will be used by Verigreen to perform its commands and verifications. If you map this as a volume on the host, the startup script will verify if there is a repository present, if not, it will perform the fresh
git cloneusing the value of the
The Verigreen source code is available on Github.
For more information on Verigreen, please visit its official documentation.
This project is released under Apache v2.0 license