forked from gopal1409/radisysgitlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHow to install gitlab
29 lines (25 loc) · 1.25 KB
/
How to install gitlab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
####gitlab installation as docker############
1 sudo apt-get update
2 sudo apt-get install ca-certificates curl gnupg lsb-release
3 sudo mkdir -p /etc/apt/keyrings
4 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
5 echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
6 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
8 docker --version
########how to install gitlab#####
export GITLAB_HOME=/srv/gitlab
sudo docker run --detach \
--hostname gitlabred.eastus.cloudapp.azure.com \
--publish 443:443 --publish 80:80 --publish 2222:22 \
--name gitlab \
--restart always \
--volume $GITLAB_HOME/config:/etc/gitlab \
--volume $GITLAB_HOME/logs:/var/log/gitlab \
--volume $GITLAB_HOME/data:/var/opt/gitlab \
--shm-size 256m \
gitlab/gitlab-ee:latest
#####how to verify the installation of gitlab
sudo docker logs -f gitlab
####how to get the root password of gitlab
sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password