docker container and docker-compose file for gitbucket

data/ conf add backup plugin 5 years ago
docker fix default uid 5 years ago
.editorconfig fix 5 years ago
.env inital commit 7 years ago
.gitignore merge scripts into 6 years ago add license 7 years ago add link 5 years ago add compose project name 5 years ago change version info to develop 5 years ago
docker-compose.yml add build 5 years ago
gitbucket.conf.example add compose project name 5 years ago merge scripts into 6 years ago

docker container for gitbucket

Build Status Donate Docker Pulls

This docker container of gitbucket is in beta state!

Table of contents




  1. Get code from repository:

    git clone
    cd gitbucket
  2. Execute install script

  3. Change the confoguration and start with:

    docker-compose up -d
  4. Open and be habby. :-) Default user and passwort are both root.


Please use the configuration file gitbucket.conf for your personal changes.


Update your gitbucket image in three steps. But first of all: MAKE A BACKUP!!! Without backup the host ssh keys will be lost.

from 4.19.3 to 4.20.0

You have to backup your gitbucket.conf because this config does not exist in the repository any more. You have to manage the config file manually. The new install script will create a local config fiel as copy from gitbucket.conf.example and generate new passwords.

from 4.27.0 to 4.28.0

To prevent error messages (like: [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade) for mariadb. Go to the directory where the docker-compose.yml file is located and execute the following commands:

source gitbucket.conf
docker-compose exec mysql-gitbucket sh -c 'exec mysql_upgrade -uroot -p"${MYSQL_ROOT_PASSWORD}"'

do update

  1. Commit your local changes. Changes in gitbucket.conf will be ignored! Pull changes from repository master via git pull or git merge.

  2. Backup

    ./ backup all
  3. get the new image Shutdown and remove your images. This will not delete your mysql database volume.

    docker-compose down

    After that get the new image and start it:

    docker-compose pull
    docker-compose up -d --remove-orphans
  4. cleanup your docker environment This step is optional. Please do this only if you understand the next line.

    docker rmi -f $(docker images -f "dangling=true" -q)
  5. restore ssh keys

    ./ restore sshkeys


To use plugins download the plugin and move it into data/plugins. After that restart the gitbucket container with docker-compose restart main-gitbucket.


Since 4.30.0 the backupplugin is included. Automatic backup for repository works, but the E-Mail notification does not work yet. If you want a full backup, please use like:

./ backup all

Plese check if COMPOSE_PROJECT_NAME exists in your local gitbucket.conf!!!

Full Backup via

For backuping the mysql database and the repositories you could use the script and combine it with a daily cronjob. This script will create a compressed backup and keep the files 10 days in the backup directory. All files which are older then 10 days will be deleted.


Error 503 on first start

Please check the gitbucket log files with

docker-compose logs main-gitbucket

If you get Could not connect to address=(host= as error: Please restart the gitbucket container with docker-compose restart main-gitbucket because the mariadb container needs some time to run completly at the first start. After that it should be work. If doesn't please contact me via because gitbucket does not allow issues for guests.

Contact and Contribution

You can write me an email ( ) or you could register here as an user to contribute to this project. After register please fork this repository and create pull reqeusts with your changes or add an issue.


  • check gitbucket.war hash after download
  • maybe a nginx container with ssl???


I got some inspirations for this project from:


cc-bc-sa: Please see license

Gitbucket license