Skip to content

Instantly share code, notes, and snippets.

@gilangvperdana
Last active April 25, 2022 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gilangvperdana/c58ce3c0eca1bd2d7289faee6d17c50e to your computer and use it in GitHub Desktop.
Save gilangvperdana/c58ce3c0eca1bd2d7289faee6d17c50e to your computer and use it in GitHub Desktop.
Docker GitLab & Jenkins

GitLab & Jenkins Docker Provisioning

Just my Learning Documentation

Docker-Compose.yml

nano docker-compose.yml
version: '2'

services:
  gitlab:
    container_name: docker-gitlab
    image: gitlab/gitlab-ce
    ports:
      - 80:80
    networks:
      main:
        aliases:
          - gitlab

  jenkins:
    container_name: docker-jenkins
    image: jenkins/jenkins
    ports:
      - 8080:8080
    networks:
      main:
        aliases:
          - jenkins

networks:
  main:
docker-compose up -d

Access

172.0.0.1:8080 for Jenkins
172.0.0.1:80 for GitLab

Credentials

Jenkins

docker exec -it jenkins bash
cat /var/jenkins_home/secrets/initialAdminPassword for Jenkins

GitLab

Username : root
Password : 
$ docker exec -it docker-gitlab bash
$ cat /etc/gitlab/initial_root_password for GitLab

GitLab External URL

docker exec -it docker-gitlab bash
vi /etc/gitlab/gitlab.rb
---
external_url 'http://gitlab.riset.com'
---

gitlab-ctl reconfigure
gitlab-ctl restart

Access on http://gitlab.riset.com

Source

https://about.gitlab.com/install/
https://rizkimufrizal.github.io/belajar-melakukan-integrasi-jenkins-dan-gitlab-pada-docker/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment