Install Private GitLab on Docker
GitLab is a great solution for us programmers to manage git repositories on a centralized server. In today’s world, there are few people who do not know and have not used GitLab and GitHub. That’s why I decided to explain how to install GitLab on Docker in Linux for you dear ones.
In the first step, we install Docker with the following command.
sudo apt install docker.io
Then, after installing Docker, we need to see if the Docker service is running or not, and we can find out what the Docker service is like with the following command.
sudo systemctl status docker
If the docker service was not run, we can run the docker service with the following command.
sudo systemctl start docker
And in the next step, we must enable this service so that this service can be run automatically if the system reboots, which we do with the following command.
sudo systemctl enable docker
In this section, if we want to see the list of containers that will be installed in Docker in the future, we can see the list with the following command.
docker ps -a
In the terminal environment, you should see an empty table from the Container list.
Note: Executing this command may ask you for permission to be a user in the Docker group in the Linux environment.
We are almost at the end of the docker installation path and we have to install the docker compose, which is an accessory next to the docker that does not come with the docker.
sudo apt install docker-compose
Well, we come to the part where we talk about the middle ground.
In this part, I want to introduce you to one of the good repository of the git for the GitLab, which has a very good document and explains all the configurations you need.
Well, let’s go to the installation of the GitLab in Docker, which I know you are waiting for :)))
First we open the following site :
In the Quick Start section, we see a link that if we open this link, I will see that many services have been defined for installing the gateway that are easily understood.
In the terminal environment, we download the file we want.
wget https://raw.githubusercontent.com/sameersbn/docker-gitlab/master/docker-compose.yml
Then we write the command we want to raise Gitlab.
Due to the speed of the Internet, we are waiting for all services to be installed and run.
By typing the command :
docker ps -a
We see that 3 services are installed and running.
127.0.0.1:10080
Open in the browser. If you see error 502, wait 10 minutes for all services to run.
Finally, after your gateway page pops up, enter your username and password, start using …