Public | Automated Build

Last pushed: 7 hours ago
Short Description
GitLab Community Edition docker image based on the Omnibus package
Full Description

GitLab Docker images

Docker Pull Command
Source Repository

Comments (86)
15 days ago

Some below asked how to run this container. The best way we came to run gitlab in docker containers (to ensure maximum performance and parameters as per documentation) is below.
We use this in a production with hundreds of users:

#/bin/bash -vx

#Desired version, unless one provided as argument

echo "Going to use: gitlab/gitlab-ce:${VERSION} "

docker pull gitlab/gitlab-ce:${VERSION}
docker stop gitlab
docker rm gitlab

#This is req. in case you use SELinux:
chcon -Rt svirt_sandbox_file_t /storage/srv/gitlab/ || true
#/proc/sys/fs/file-max #this is shared with the host
[[ $(cat /proc/sys/fs/file-max) -lt ${GITLAB_FILEMAX} ]] && echo $GITLAB_FILEMAX > /proc/sys/fs/file-max

# #mattermost docker containers
# # --sysctl vm.overcommit_memory=1 \
docker run --detach --name gitlab \
 --hostname \
 --sysctl net.core.somaxconn=1024 \
 --ulimit sigpending=62793 \
 --ulimit nproc=131072 \
 --ulimit nofile=60000 \
 --ulimit core=0 \
 --publish 443:443 --publish 80:80 --publish 22:22 --publish 8060:8060 \
 --restart always \
 --env GITLAB_OMNIBUS_CONFIG="external_url ''; gitlab_rails['lfs_enabled'] = true; mattermost_external_url '';" \
 --volume /storage/srv/gitlab/config:/etc/gitlab:z \
 --volume /storage/srv/gitlab/logs:/var/log/gitlab:z \
 --volume /storage/srv/gitlab/data:/var/opt/gitlab:z \
 --volume /etc/localtime:/etc/localtime \

# --privileged is required in order to set proper ulimits somaxconn, fs.file-max, etc; from all these, only file-max influences host, rest are only at cont. level.
# --ulimit sigpending=62793 --ulimit nproc=131072
# we cannot mount /proc/sys/net/core/somaxconn inside container (docker error:  cannot be mounted because it is located inside "/proc" )
# none of of capabilites help. We tried: docker run --ulimit sigpending=62793 --ulimit nproc=131072 --cap-add=CHOWN --cap-add=DAC_OVERRIDE --cap-add=FSETID --cap-add=FOWNER --cap-add=MKNOD --cap-add=NET_RAW --cap-add=SETGID --cap-add=SETUID --cap-add=SETFCAP --cap-add=SETPCAP --cap-add=NET_BIND_SERVICE --cap-add=SYS_CHROOT --cap-add=KILL --cap-add=AUDIT_WRITE gitlab/gitlab-ce

# To remove --privileged we need docker 1.12+ where we can set sysctl parameters on docker run, like we can ulimit parameters now. Till then, we need --privileged.

echo -e "waiting for services to start before checking status. So: sleeping 60 sec. \nFor startup status, if you want, you may want to ctrl+x and run: 'docker logs -f gitlab' or 'docker exec gitlab gitlab-ctl status' yourself."
sleep 60
docker exec gitlab gitlab-ctl status
17 days ago

After fighting with this container for many months, I found out that there is sameersbn/gitlab which is much more polished, with saner defaults, no additional services bundled into a single container and the documentation is excelent.

So I strongly recommend it instead of this official (and extremely messy) gitlab/gitlab-ce one. The url is:

If you don't already have a redis and a postgres installation ready, please, just use docker-compose instead of sticking many services into one container:

17 days ago

Does the service starts on port 443? I have mapped the port, but access port 443 gives me nothing. Port 80 works well.

17 days ago

Please add description about how to use this image. E.g.:

What are these volumes for?

"/etc/gitlab", "/var/opt/gitlab", "/var/log/gitlab"
25 days ago

Hi , i try to build this Dockerfile locally (docker build -t gitlab .) but it shows me this error all the time :

Step 12/13 : COPY /assets/wrapper /usr/local/bin/
lstat assets/wrapper: no such file or directory

someone can help PLZ

a month ago

Hi all.

I want to migrate from one VPS to another with this image, what is best way to move all info?

2 months ago

Almost 6000 open issues on Gitlab CE. Reason enough why they're not GitHub.

3 months ago

Hi, can you pls provide an image for ARM-architecture (Raspberry Pi 3)? Maybe this article will help:
Thanks a lot!

4 months ago

I check some image version got from
and run into the same error with

I provide some information.
Will you please check it.
If you need more information please let me know
Thank you

4 months ago

Right... their build system is a mess. It's the reason why the "Build Details" tab shows bogus data and their Dockerfile is broken. Really messy project.

You might want to search for known bugs in their issue trackers or open a new one. I suggest starting with these: