By Stephan Wijman


I had GitLab running on one of my Proxmox VE server as a VM, but that required more resources and a fixed disk-size, making it more difficult to manage.
I then went to do some research to see if it is possible to GitLab as a container instead. After some trial and error I have been able to get it to work and want to share the steps I have taken to make it work.

Changes on Proxmox host

The first step is to edit /etc/sysctl.conf and add the following lines:

kernel.sem=250 32000 32 262

NOTE: You can lookup those values on your GitLab container with:

cat /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.*</code>

Load the new settings with the following command:

systemctl -p

Changes inside GitLab container

This requires that an initial attempt of installing GitLab has been executed, so the required config file has been created.

Inside the LXC container where GitLab (Omnibus package) is installed edit /etc/gitlab/gitlab.rb and add the following lines:

##! Attempt to modify kernel paramaters. To skip this in containers where the
##! relevant file system is read-only, set the value to false.
package['modify_kernel_parameters'] = false

Then run the following command to reconfigure Gitlab, which should run through without issues:

gitlab-ctl reconfigure

Now GitLab will complete the installation and will be operational for use.

Stephan Wijman • 31 Articles

View Articles