GitLab Community Edition docker image based on the Omnibus package
Visit the GitLab URL, and sign in with the username root and the password from the following command: docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
GitLab requires stopping at intermediate versions (x.2, x.5, x.8, x.11) during upgrades.
Background migrations must complete before proceeding to the next version.
Example: 17.11 -> 18.2 -> 18.5 -> 18.8 (cannot skip intermediate stops)
PostgreSQL: GitLab 18+ requires PostgreSQL 16.5+. Version 14 is no longer supported.
For single-node Linux package installs, run: sudo gitlab-ctl pg-upgrade -V 16
For HA/Geo/external DB setups, upgrade PostgreSQL manually before upgrading GitLab.
Check pending migrations before upgrading:
docker exec -it gitlab gitlab-psql -c “SELECT job_class_name, table_name FROM batched_background_migrations WHERE status NOT IN(3, 6);”
name: gitlabservices:
gitlab:
image: gitlab/gitlab-ce:18.11.14-ce.0@sha256:bbfd0b2d484574ffd18fa71aa5023df39cb0c5e99f50f121ec68af52cb60dac8container_name: gitlabrestart: unless-stopped# Do not use 'gitlab.${MYDOMAIN}', because the runner would use it and skip Traefik, resulting certificate errorhostname: 'gitlab'environment:
TZ: ${TIMEZONE}GITLAB_OMNIBUS_CONFIG: | external_url 'https://gitlab.${MYDOMAIN}'
# Add any other gitlab.rb configuration here, each on its own line
gitlab_rails['gitlab_shell_ssh_port'] = 3022
# HTTPS is handled by Traefik
nginx['listen_https'] = false
nginx['listen_port'] = 80ports:
- '3022:22'# expose GitLab SSH on port 3022 on the host, as Traefik does not yet support TCP routingvolumes:
- '${DOCKER_VOLUMES}/gitlab/config:/etc/gitlab' - '${DOCKER_VOLUMES}/gitlab/logs:/var/log/gitlab' - '${DOCKER_VOLUMES}/gitlab/data:/var/opt/gitlab'shm_size: '256m'networks:
- proxylabels:
traefik.enable: truetraefik.http.routers.gitlab.middlewares: localaccess@filetraefik.http.services.gitlab.loadbalancer.server.port: 80homepage.group: Developmenthomepage.name: GitLabhomepage.icon: gitlab.pnghomepage.href: https://gitlab.${MYDOMAIN}/homepage.description: "GitLab Community Edition"gitlab-runner:
image: gitlab/gitlab-runner:v18.11.4@sha256:96fbcefea955010d39e22408abd71e76c4da0c732bc200506fbef1c001c4d1c6container_name: gitlab-runnerrestart: unless-stoppedenvironment:
TZ: ${TIMEZONE}volumes:
- '${DOCKER_VOLUMES}/gitlab-runner/config:/etc/gitlab-runner'# kics-scan ignore-line - '/var/run/docker.sock:/var/run/docker.sock'networks:
- proxynetworks:
proxy:
external: true