Build a GitLab Docker image locally

The GitLab Docker image uses the Ubuntu 22.04 package created by omnibus-gitlab. Most of the files needed for building a Docker image are in the Docker directory of the omnibus-gitlab repository. The RELEASE file is not in this directory, and you must create this file.

Create the RELEASE file

The version details of the package being used are stored in the RELEASE file. To build your own Docker image, create this file with contents similar to the following.

  • RELEASE_PACKAGE specifies whether the package is a CE one or EE one.
  • RELEASE_VERSION specifies the version of the package, for example 13.2.0-ee.
  • DOWNLOAD_URL specifies the URL where that package can be downloaded from.

NOTE Note: We’re looking at improving this situation, and using locally available packages in issue #5550.

Build the Docker image

To build the Docker image after populating the RELEASE file:

cd docker
docker build -t omnibus-gitlab-image:custom .

The image is built and tagged as omnibus-gitlab-image:custom.