*This article is an English translation of the following article.
windowsでgitlabを動かす[覚書]
Translated using deepl.
Introduction.
I wanted to implement gitlab at work, so I used wsl, which can run linux in a windows environment, to try it out.
Installation of wsl2
- Administrative execution of powershell.
- Execute the following commands.
wsl --install
3. Reboot after INSTALL.
4. Create a new ubuntu user after rebooting.
docker installation on ubuntu
Run the following command from ubuntu.
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Also install docker-compose.Ubuntu 20.04にDockerとdocker-composeを導入する
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
Launching gitlab
Place the following docker-compose.yml in any directory and start docker-compose.
version: '3'
services:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://192.168.0.4:8929'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
nginx['listen_port'] = 80
ports:
- '8929:80'
- '2224:22'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab'
sudo docker-compose up -d
On the way, you will be warned that you have permission to drill holes in the firewall, so allow it.
This will get you up and running in the meantime.
redundancy
It started up at one point, but my machine couldn't take it :(
Reference website
WSL2のインストールを分かりやすく解説【Windows10/11】
Top comments (0)