DEV Community

shizimi-code
shizimi-code

Posted on

Running gitlab on windows [memorandum].

*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

  1. Administrative execution of powershell.
  2. Execute the following commands.
wsl --install
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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'


Enter fullscreen mode Exit fullscreen mode
 sudo docker-compose up -d   
Enter fullscreen mode Exit fullscreen mode

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 :(

CPUs and disks are under pressure.


Reference website
WSL2のインストールを分かりやすく解説【Windows10/11】

docker-composeでGitLab

WindowsにWSL2とDockerをインストールする手順

Ubuntu on WSL2でのDocker Engineの最短インストール手順

Top comments (0)