Article Directory
1 Installation requirements
Hardware: memory at least 2g
Software: docker and docker-compose installed
2 Installation steps
1 Pull the image and verify
docker pull twang2218/gitlab-ce-zh && docker images
2 Enter the installation directory and edit the startup file docker-compose.yml
mkdir -p /usr/local/docker/gitlab/ && \
cd /usr/local/docker/gitlab && vi docker-compose.yml
3 Edit the content of the file docker-compose.yml
- Mirror reference URL: https://hub.docker.com/
- The ip address in the file content
http://192.168.30.143
needs to be replaced with your own
version: '3'
services:
gitlab:
image: 'twang2218/gitlab-ce-zh'
restart: unless-stopped
hostname: '192.168.30.143'
environment:
TZ: 'Asia/Beijing'
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://192.168.30.143'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
unicorn['port'] = 8888
nginx['listen_port'] = 80
ports:
- '82:80'
- '8443:443'
- '2224:22'
volumes:
- /usr/local/docker/gitlab/config:/etc/gitlab
- /usr/local/docker/gitlab/data:/var/opt/gitlab
- /usr/local/docker/gitlab/logs:/var/log/gitlab
4 Start in the current directory
docker-compose up -d
5 Start verification
- After starting, visit
http://192.168.30.143:82
to verify - The default username is root, and the password needs to be set manually, requiring at least 8 characters
- It is recommended to create a new administrator account for management
3 Configure ssh secret key password
For windows configuration method, refer to the blog: http://blog.csdn.net/lsyz0021/article/details/52064829
windows default ssh key file directory is:C:\Users\计算机名\.ssh