Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install gitlab on Windows with Docker

I searched a lot and found that GitLab Community Edition is not installed on Windows so now I want to install it with the help of Docker. I do not know that is it possible and how I can do it ?

like image 878
helenDeveloper Avatar asked Jan 02 '18 08:01

helenDeveloper


4 Answers

You can check gitlab documantation from Expose GitLab on different ports section.

Before starting the installation create 3 folder which names "config","data","logs" in a "gitlab" folder. And run your gitlab-ce image with docker run command.Gitlab should be running firstly.

Note that I will use 8082 port for gitlab server.You can change it with any port number.

1-open cmd and show your IP address.You need to look for the IPv4 Address in your network adapter :

ipconfig

enter image description here

2-Run your docker-ce image with this command :

docker run --detach --hostname YOUR-IP-ADRESS --publish 8082:8082 --publish 2282:22 --name gitlab --restart always --volume D:\DevOps\Gitlab/config:/etc/gitlab --volume D:\DevOps\Gitlab/logs:/var/log/gitlab --volume D:\DevOps\Gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest

enter image description here 3-In docker terminal(in docker gui application press to "cli" buton) go here :

cd etc/gitlab

nano gitlab.rb

4-Go to end of file at gitlab.rb and write these lines :

external_url "http://your-ip-address:8082"

gitlab_rails['gitlab_shell_ssh_port'] = 2282

5-After save and close to gitlab.rb file enter this code for reconfiguration:

gitlab-ctl reconfigure

6-Remove your docker container and run with this command again:

docker run --detach --hostname YOUR-IP-ADRESS --publish 8082:8082 --publish 2282:22 --name gitlab --restart always --volume D:\DevOps\Gitlab/config:/etc/gitlab --volume D:\DevOps\Gitlab/logs:/var/log/gitlab --volume D:\DevOps\Gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest

like image 190
Ömür Alçin Avatar answered Nov 15 '22 16:11

Ömür Alçin


  1. You need to install Docker for Windows.

  2. Share drive for Docker (in Docker's settings > shared drives). For example, drive E:

    settings

  1. Then, you need to create 3 directories on drive E: (e:\gitlab\config, e:\gitlab\logs, e:\gitlab\data)

  2. From the Command Prompt, run:

    docker run --detach --hostname gitlab.yourdomain.ru 
    --publish 443:443 --publish 80:80 --publish 22:22 --name gitlab 
    --restart always --volume e:\gitlab\config:/etc/gitlab 
    --volume e:\gitlab\logs:/var/log/gitlab 
    --volume e:\gitlab\data:/var/opt/gitlab gitlab/gitlab-ce:latest
    

That's it! You have now successfully run GitLab image.

like image 33
mr_squall Avatar answered Nov 15 '22 16:11

mr_squall


I found the solution here, there is a issue related with volumes when installing in Docker for Windows

https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/2280

like image 40
ssanga Avatar answered Nov 15 '22 16:11

ssanga


Yes, you can run gitlab-ce on windows using Docker. First, make sure docker is installed on Windows, otherwise install it.

A detailed documentation for how to run gitlab using Docker is found under GitLab Docker images including how to access the web interface.

like image 38
yamenk Avatar answered Nov 15 '22 16:11

yamenk