Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Dockerized Stash

A Stash docker image with a focus on enabling user configuration and automation.


  • Requires a computer(real or virtual) running ubuntu
  • Must have docker installed
  • Must have a configuration file called config.yml with all needed values. Or you can modify the included sample file to fit your particular installation. Please see the configuration section for details on how to setup your config file.

  • If you are behind a proxy you must have your settings properly configured so that docker can retrieve the official stash image (if you want to build the image from the Dockerfile)

  • Must have a database, be it in a docker container or a physical or virtual machine, properly configured with a user and a database for stash

  • Must have a verigreen server properly configured


  • Move the following files to your configuration directory:
    • config.yml
    • the rsa public keys of the stash users you wish to create
  • Run the following command:

    sudo docker run -it -p <host http port>:7990 -p <host ssh port>:7999 \
    -v /path/to/config/directory:/var/stash/config \
    -v /path/to/stash/home:/var/atlassian/application-data/stash \
    --link <name of database container>:<name of database container> \
  • Wait a few seconds (about a minute or two should be more than enough) for tomcat to initialize

  • Point your browser to localhost:5000 (or whatever port you defined as the stash http port)

  • If everything went well you should have a working stash container with your predefined users, projects and repositories already created and all your plugins and hooks installed and verified with verigreen.
  • Enjoy!


# Stash administrator
   name: #display name of the admin

# Stash regular users(for pushing code) this is an array of users and their information
   - username: 
     name: #display name of the user
     ssh_key: #name of the RSA key file for this user

# Project and repository information
projects: # this is an array of projects
   - key: #project key
     name: #project display name
     desc: #short description of your project
     repositories: #this is an array of repositories for this project
        - name: #repository name
          permissions: #an array of permissions for this repository
             - username: #
               access: #access level, possible values: read, write, admin

#user_directories: #need to look this up

# Stash settings
system_name: #this is the name that appears in the login screen

# Database parameters
db_user: #username that you created for stash in the database
db_password: #password of the stash database user
db_type: #currently supported: oracle, postgresql
db_host: #container or host where the database resides
db_port: #database port, default oracle port is 1521, default postgresql port is 5432
db_name: #name of the database stash will be using

# Stash cloning parameters
license: #your stash licence goes here
server_id: #and your server id

# Proxy settings
# If either https or http is set, but not the other, the missing one will be set to the one that was provided. 
# If either http or https is provided and no_proxy is not provided, it will default to ",localhost"

# Plugins 
# These are the plugins to be installed, requires both the name and version
   - name: "com.ngs.stash.externalhooks.external-hooks"
     version: 161
   - name: "com.risingoak.stash.plugins.stash-enforce-author-hook"
     version: 14

# Host-container interface parameters
http_port: #host port that will be used for http connections with the stash container
ssh_port: #host port that wil be used for ssh connections with the stash container

# Verigreen properties
collector_address: #the url of your verigreen collector
Docker Pull Command