Docker Container Upgrade Issue

Hello Everyone, really hoping for some help as I’m a bit stumped.

I have a Gitlab-ee instance running in a Docker container setup on an Ubuntu server. The current instance is configured to use Docker volumes for config, logs, and data.

My current running version is 14.7.0, so, of course, I would like to upgrade. After reading through the documentation and countless blog posts, I have settled on the following process, but it doesn’t seem to work.

My process after reading all of the documentation:

  • Create current snapshot on cloud provider.

  • Create copy of Docker volume folder(s) for config/logs/data that can be used after upgrade.

  • Create a backup of GitLab
    docker exec -it gitlab /bin/bash
    mkdir /var/opt/gitlab/gitlab-backup
    gitlab-backup create

  • Copy the backup *.tar file to the Host computer for use after upgrade.

  • Since I am so many versions behind I am trying to follow the recommended upgrade path as defined by the upgrade path tool.
    Upgrade Path

  • Upgrade process steps:
    docker stop gitlab
    docker rm gitlab
    docker image rm gitlab/gitlab-ee:latest

  • Then I run the docker run command (the $GITLAB_HOME variable recommended in the documentation wasn’t working so I tried a direct path route):

sudo docker run --detach \
  --hostname \
  --publish 443:443 --publish 80:80 --publish 22:22 \
  --name gitlab \
  --restart always \
  --volume /var/gitlab/config:/home/GitLab/config
  --volume /var/gitlab/logs:/home/GitLab/logs
  --volume /var/gitlab/data:/home/GitLab/data
  --shm-size 256m \

After the installation is finished I can access the new GitLab version using the default install root password but none of my configurations or data (Projects, repository, etc) is present. Even though it does exist in the Docker volumes.

I’m clearly missing step(s) somewhere but I don’t understand why GitLab isn’t using the Docker volumes after the install to show the configurations and data.

Thank you in advance for any help.


I caught an error in the docker runn command. I had my folder mappings backwards. The actual command I’m running is:

sudo docker run --detach \
  --hostname \
  --publish 443:443 --publish 80:80 --publish 22:22 \
  --name gitlab \
  --restart always \
 --volume /home/GitLab/config:/etc/gitlab \
  --volume /home/GitLab/logs:/var/gitlab \
  --volume /home/GitLab/data:/var/opt/gitlab \
  --shm-size 256m \

Now when I try the upgrade it fails with the following error in the logs:

Running handlers:
There was an error running gitlab-ctl reconfigure:

rails_migration[gitlab-rails] (gitlab::database_migrations line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: bash[migrate gitlab-rails database] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/rails_migration.rb line 16) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’