Sunday, May 10, 2020

How To Install Gitlab with Docker on Ubuntu 18.04

Video Tutorial - https://youtu.be/DLzH9pFkZSs

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

GitLab is a web-based DevOps lifecycle tool that provides a Git-repository manager providing wiki, issue-tracking and continuous integration/continuous deployment pipeline features, using an open-source license, developed by GitLab Inc.

Docker is an open source platform for building, deploying, and managing containerized applications.
Offcial Website -https://about.gitlab.com/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Testing Environment:
Ubuntu 18.04.4 LTS bionic            Hostname - www.yourdomain.com  - ip Address - 192.168.1.40
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
apt update ; apt install -y build-essential net-tools curl git software-properties-common  ca-certificates curl openssh-server ufw apt-transport-https

sudo gedit /etc/ssh/sshd_config &>/dev/null
systemctl restart sshd ; systemctl status sshd

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update
apt install docker-ce -y
systemctl status docker
usermod -aG docker $USER
su - ${USER}
docker run hello-world

curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
curl -L https://raw.githubusercontent.com/docker/compose/1.24.1/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose

docker-compose --version
docker pull gitlab/gitlab-ee:latest
docker images

sudo docker run --detach \
  --hostname www.yourdomain.com \
  --publish 443:443 --publish 80:80 --publish 22:22 \
  --name gitlab \
  --restart always \
  --volume /srv/gitlab/config:/etc/gitlab \
  --volume /srv/gitlab/logs:/var/log/gitlab \
  --volume /srv/gitlab/data:/var/opt/gitlab \
  --env GITLAB_OMNIBUS_CONFIG="external_url 'https://www.yourdomain.com/';" \
  gitlab/gitlab-ee:latest

https://www.yourdomain.com
docker ps

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment