Public | Automated Build

Last pushed: a year ago
Short Description
On-premises source code management for Git that's secure, fast, and enterprise grade.
Full Description

This image has been deprecated!

Stash is now Bitbucket Server. For the latest Docker images, checkout the new repository from bitbucket.org or hub.docker.com.

To read all the details check out this announcement.

Stash Docker images are no longer supported and are not recommended for production use.

Overview

This Docker container makes it easy to get an instance of Stash up and running
for evaluative purposes. Atlassian is not yet able to provide support for using Docker in production.

Quick Start

For the STASH_HOME directory that is used to store the repository data
(amongst other things) we recommend mounting a host directory as a data volume:

Set permissions for the data directory so that the runuser can write to it:

$> docker run -u root -v /data/stash:/var/atlassian/application-data/stash atlassian/stash chown -R daemon  /var/atlassian/application-data/stash

Start Atlassian Stash:

$> docker run -v /data/stash:/var/atlassian/application-data/stash --name="stash" -d -p 7990:7990 -p 7999:7999 atlassian/stash

Success. Stash is now available on http://localhost:7990*

Please ensure your container has the necessary resources allocated to it.
We recommend 2GiB of memory allocated to accommodate both the application server
and the git processes.
See Supported Platforms for further information.

* Note: If you are using boot2docker on Mac OS X, please use open http://$(boot2docker ip):7990 instead.

Upgrade

To upgrade to a more recent version of Stash you can simply stop the stash
container and start a new one based on a more recent image:

$> docker stop stash
$> docker rm stash
$> docker run ... (See above)

As your data is stored in the data volume directory on the host it will still
be available after the upgrade.

Note: Please make sure that you don't accidentally remove the stash
container and its volumes using the -v option.

Backup

For evalutations you can use the built-in database that will store its files in the Stash home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (/data/stash in the example above).

The Stash Backup Client is currently not supported in the Docker setup. You can however use the Stash DIY Backup approach in case you decided to use an external database.

Read more about data recovery and backups: https://confluence.atlassian.com/display/STASH/Data+recovery+and+backups

Versioning

The latest tag matches the most recent release of Atlassian Stash.
Thus atlassian/stash:latest will use the newest version of Stash available.

Alternatively you can use a specific minor version of Stash by using a version number
tag: atlassian/stash:3.5. This will install the latest 3.5.x version that
is available.

Issue tracker

Please raise an
issue if you
encounter any problems with this Dockerfile.

Docker Pull Command
Owner
atlassian

Comments (7)
ssaasen
2 years ago

Hey robotroll,

Please have a look here: https://hub.docker.com/r/atlassian/bitbucket-server/

All future release 4.0 and higher will be available there while this repository will only contain Stash 3.x versions.

Hope that helps.

robotroll
2 years ago

Any plans on bumbing up the version / name to bitbucket server (4.0.1)?

preflightsiren
2 years ago

Hey nidhi7,

If I understand your question, you want a new image to be available on hub.docker.com every time you commit a change to your git repository? if so, you'll want to read up on automated builds https://docs.docker.com/docker-hub/builds/ they integrate well with https://bitbucket.org (in fact that's how this project is updated)

regarding the definition of evaluation purposes, it means Atlassian would like to provide you a really simple to way to download and run stash, without having to consider creating IT infrastructure, downloading installers, familiarising yourself with documentation. The image is a turnkey option that gets you up and running fast! The cost of this is that sometimes what works great for small teams and workloads won't work well when you start growing your team or number of projects.

For that reason Docker is not a supported platform for running Stash.

nidhi7
2 years ago

Hi, I am new to docker and my task is to update a stash git repo's docker image whenever there is a commit. I am unable to link the repo with docker hub and so am wandering whether this stash image would be of any help ? Also, What do you mean it can be used for evaluative purposes ?

ssaasen
2 years ago

Hey Aleksandrvin, could you please raise an issue here: https://bitbucket.org/atlassian/docker-atlassian-stash/issue

https://bitbucket.org/atlassian/docker-atlassian-stash/issue/1/startup-problem may also be interesting to you. You have to make sure that your container has sufficient resources, otherwise you may be seeing issues like this.

aleksandrvin
2 years ago

Sorry to mention, but right now it does not start, saying "Required plugin com.atlassian.stash.stash-jira-integration has failed to start"...

kristoffer
3 years ago

You where a bit late in getting Stash in a Docker Image. So I had to set up one myself. I did get the backup client working too though. Running it as a separate image (kristoffer/atlassian-stash-backup-client ) and linking it to the relevant data container.