Host Your Own GitHub Alternative with GitLab in Docker

Channel:
Subscribers:
14,500
Published on ● Video Link: https://www.youtube.com/watch?v=e1BqlgBL-vY



Category:
Tutorial
Duration: 1:41
647 views
18


#GitLab #Docker #Git

Full steps can be found at https://i12bretro.github.io/tutorials/0496.html

--------------------------------------------------------------------
What is GitLab
--------------------------------------------------------------------
GitLab is an open source end-to-end software development platform with built-in version control, issue tracking, code review, CI/CD, and more. Self-host GitLab on your own servers, in a container, or on a cloud provider. - https://gitlab.com/gitlab-org/gitlab
 
--------------------------------------------------------------------
Installing Docker
--------------------------------------------------------------------
   01. Log into the Linux based device
   02. Run the following commands in the terminal
         # install prerequisites
         sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
         # add docker gpg key
         curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
         # add docker software repository
         sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
         # install docker
         sudo apt install docker-ce docker-compose containerd.io -y
         # enable and start docker service
         sudo systemctl enable docker && sudo systemctl start docker
         # add the current user to the docker group
         sudo usermod -aG docker $USER
         # reauthenticate for the new group membership to take effect
         su - $USER
 
--------------------------------------------------------------------
Running GitLab
--------------------------------------------------------------------
   01. Now that Docker is installed, run the following commands to setup the GitLab Docker container and run it
         # create working directory
         sudo mkdir /home/$USER/docker/gitlab -p
         # run the GitLab docker container
         docker run --name gitlab -d --hostname DNSofHost -p 8000:80 -v /home/$USER/docker/gitlab/config:/etc/gitlab -v /home/$USER/docker/gitlab/logs:/var/log/gitlab -v /home/$USER/docker/gitlab/data:/var/opt/gitlab --restart=unless-stopped gitlab/gitlab-ce:latest
         # output root user password
         docker exec -it gitlab cat /etc/gitlab/initial_root_password
   02. Copy the password to your clipboard
   03. Open a web browser and navigate to http://DNSorIP:8000
   04. Login with the username root and the password copied earlier
   05. Welcome to GitLab running in a Docker container
 
Documentation:  https://hub.docker.com/r/gitlab/gitlab-ce/
 


### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro







Tags:
Browser Based
Container
Containerization
Docker
Docker How To
Docker Installation Tutorial
Docker Made Easy
Docker Simplified
Docker Tutorial
Getting Started With Docker
Git
GitHub Alternatives
GitLab
Home Lab
Home Lab Ideas
How To
How To Install GitLab
Install Guide
Linux
Self-Hosted
Self-hosted GitHub Alternative
Source Control
Tutorial
Ubuntu
Web Based
Web Based Tools
i12bretro