Hello, let us install GitLab (community edition), locally, with lxc container, from Debian FastTrack repository.

Install lxc

sudo apt install lxc

Create and attach to a bullseye (stable) container

sudo lxc-create -n gitlab -t debian -- -r bullseye
sudo lxc-start -n gitlab
sudo lxc-attach -n gitlab

Install keyring and repos of FastTrack

apt install fasttrack-archive-keyring ca-certificates

echo 'deb https://fasttrack.debian.net/debian/ bullseye-fasttrack main contrib' > /etc/apt/sources.list.d/fasttrack.list
echo 'deb https://fasttrack.debian.net/debian/ bullseye-backports-staging main contrib' >> /etc/apt/sources.list.d/fasttrack.list

echo 'deb http://deb.debian.org/debian bullseye main contrib' > /etc/apt/sources.list
echo 'deb http://security.debian.org/debian-security bullseye-security main' >> /etc/apt/sources.list
echo 'deb http://deb.debian.org/debian bullseye-backports main contrib' >> /etc/apt/sources.list

Install GitLab

apt update
apt install gitlab-apt-pin-preferences
apt install gitlab

Set hostname during installation

gitlab hostname = gitlab.lxc

Add gitlab.lxc in host machine’s /etc/hosts

  gitlab.lxc  ip_address_of_container

Visit GitLab in browser (host machine)

http://gitlab.lxc

Thank you.

References

https://wiki.debian.org/gitlab
https://wiki.debian.org/gitlab/lxc