티스토리 뷰
이전에 VirtualBox에서 gitlab을 설치하고 이것을 이용하는 방법에 대해서 알아보았습니다.
2020/03/15 - [Version Control] - Install and Configure GitLab on CentOS8
Install and Configure GitLab on CentOS8
오늘은 제가 GitLab을 CentOS8에 설치하여 보려고 합니다. 무료인 CE 버전을 설치하여 보려고 합니다. *중요 : 웬만하면 최소사양을 지켜주세요. 재부팅후 살아나는데 메모리가 부족해서 서버가 뜨질 않아요 2코어..
mrgamza.tistory.com
오늘은 도커를 이용하여 조금 더 쉽게 하는 방법을 알아볼게요.
솔찍히 컨테이너 올리고 나면 할게 없습니다. :D
1. docker image download
$ sudo docker pull gitlab/gitlab-ce:latest
2. GitLab CE Run different ports
저는 포트를 변경하여서 사용하는 방법으로 구성을 하였습니다.
$ sudo docker run --detach \
--hostname gitlab.example.com \
--publish 8929:8929 --publish 2289: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 \
gitlab/gitlab-ce:latest
설명을 하자면 publish에서 port을 8929:8929로 이용하려고 하는겁니다. 외부:내부 이렇게 되는겁니다.
3. Configuration
그냥 하는거면 되는것으로 아는데 포트를 변경하였기 때문에 내부 설정도 변경하여 줍시다.
$ sudo docker exec -it gitlab /bin/bash
도커 내부에 접근하여서 설정 파일을 수정하여 줍니다.
$ nano /etc/gitlab/gitlab.rb
다음을 수정하여 봅시다.
이 두가지를 찾아서 이렇게 변경하고 저장하고 나와주세요.
external_url "YourIP:8929"
gitlab_rails['gitlab_shell_ssh_port'] = 2289
마지막으로 reconfigure를 하여 줍시다.
$ gitlab-ctl reconfigure
이렇게 하면 YourIP:8929를 브라우저에 치게 되면 gitlab이 노출 되게 됩니다.
공식 지원 사이트에서도 확인 가능합니다.
https://docs.gitlab.com/omnibus/docker/#install-gitlab-using-docker-compose
GitLab Docker images | GitLab
GitLab Docker images Both GitLab CE and EE are in Docker Hub: The GitLab Docker images are monolithic images of GitLab running all the necessary services on a single container. In the following examples we are using the image of GitLab CE. To use GitLab EE
docs.gitlab.com
'Backend > Docker' 카테고리의 다른 글
docker-compose를 이용한 golang server 구동 (0) | 2020.03.31 |
---|---|
docker-compose 사용하기 (0) | 2020.03.29 |
CentOS에서 systemctl을 이용하여 부팅시에 자동으로 컨테이너 실행하기 (0) | 2020.03.29 |
CentOS8에 Docker 설치하기 (0) | 2020.03.24 |
Docker. kill하고 싶다면... (0) | 2019.09.02 |
- Total
- Today
- Yesterday
- rxswift
- Kotlin
- Python
- Linux
- centos8
- ubuntu
- war
- cocoapods
- intellij
- tomcat
- Gradle
- docker
- Spring
- php
- nodejs
- MySQL
- SWIFT
- Windows
- Codable
- github
- golang
- enum
- Xcode
- go
- windows10
- Java
- CentOS
- ios
- git
- android
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |