Fading Coder

An Old Coder’s Final Dance

You are here: Home > Tech > Content

Setting Up GitLab Docker Environment on Windows 10

Tech 2

GitLab Community Edition (CE) does not current offer a dedicated installer package for Windows. Hence, one of the most straightforward methods too deploy GitLab on a Windows system is through Docker. This guide aims to provide a comprehensive walk-through of the installation process, making it accessible even to those less familiar with Docker or GitLab.

Prerequisites

Before starting, ensure your system complies with the following requirements:

  • Operating System: Windows 10 Pro, version 20H2, build 19042.631
  • Software: Docker Desktop 3.1.0
  • Tool Image: GitLab CE version 13.8.4

Step 1: Enable WSL 2

Windows Subsystem for Linux (WSL) must be enabled to support Docker. Follow these instructions to prepare your environment:

  1. Enable Windows Subsystem for Linux: Open PowerShell with administrative privileges and execute the command:

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    

    Restart your system when prompted.

  2. Enable Virtual Machine Feature: Run the following command from PowerShell:

    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    

    Restart your computer to finalize these settings.

  3. Install WSL Kernel Update Package: Download and install the latest Linux kernel update package.

  4. Set WSL 2 as the Default Version: Execute:

    wsl --set-default-version 2
    

Step 2: Install Docker Desktop

  1. Downloda: Obtain the Docker Desktop installer executable from Docker's download page.

  2. Install: Run the installer and follow the configuration instructions. Ensure "Install required Windows components for WSL 2" is selected.

  3. Verify Installation: Open PowerShell and check Docker's installation using:

    docker --version
    

Step 3: Setup GitLab Using Docker

  1. Pull GitLab's Docker Image:

    docker pull gitlab/gitlab-ce:13.8.4-ce.0
    

    Alternatively, if the version number is unnecessary, omit it for the latest image:

    docker pull gitlab/gitlab-ce
    
  2. Create Data Volumes: Use the following commands:

    docker volume create gitlab-data-vol
    docker volume create gitlab-log-vol
    docker volume create gitlab-config-vol
    
  3. Run GitLab Container: Execute:

    docker run --detach `
      --publish 443:443 --publish 80:80 --publish 22:22 `
      --name gitlab `
      --restart always `
      --volume gitlab-config-vol:/etc/gitlab `
      --volume gitlab-log-vol:/var/log/gitlab `
      --volume gitlab-data-vol:/var/opt/gitlab `
      gitlab/gitlab-ce:13.8.4-ce.0
    

* Ensure the above command is adapted if run on a terminal requiring different line continuation syntax.

  1. Verify Installation: Check the running container:
    docker ps
    

Access GitLab

Once the container and necessary configurations are set, GitLab can be accessed via http://localhost from your browser. Additional configuration, such as defining the external URL or setting up SSL certificates, can be customized within the GitLab container itself.

For further customization and advanced features, refer to GitLab's official Docker documentation.

Tags: GitLab

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.