{"id":15055465,"url":"https://github.com/attakenn/gitlab","last_synced_at":"2026-03-16T18:35:28.998Z","repository":{"id":238470829,"uuid":"796624372","full_name":"AttaKenn/gitlab","owner":"AttaKenn","description":"Set up a GitLab Server as a Docker container on your local machine","archived":false,"fork":false,"pushed_at":"2024-05-06T15:14:07.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T23:26:23.529Z","etag":null,"topics":["docker","docker-compose","git","gitlab"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AttaKenn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-06T10:09:36.000Z","updated_at":"2024-05-06T15:19:35.000Z","dependencies_parsed_at":"2024-05-06T11:29:55.123Z","dependency_job_id":"406c8965-1116-4825-b49c-89f1081ba1f8","html_url":"https://github.com/AttaKenn/gitlab","commit_stats":null,"previous_names":["attakenn/gitlab"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AttaKenn%2Fgitlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AttaKenn%2Fgitlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AttaKenn%2Fgitlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AttaKenn%2Fgitlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AttaKenn","download_url":"https://codeload.github.com/AttaKenn/gitlab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243523202,"owners_count":20304556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","git","gitlab"],"created_at":"2024-09-24T21:42:24.633Z","updated_at":"2025-12-27T22:30:40.190Z","avatar_url":"https://github.com/AttaKenn.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitLab\n\nThis project illustrates how to set up or install GitLab Server on Docker on your local machine.\n\nIn this project, I use Docker Desktop (version 25.0.3, build 4debf41) with WSL2 integration (Ubuntu 22.04.3 LTS) which also comes with Docker Compose (version 2.24.6-desktop.1)\n\nLeveraging Docker, particularly Docker Compose, streamlines GitLab installation. Docker technology offers significant advantages, including efficient resource utilization (compute and memory), rapid startup times, and inherent lightweight portability across environments.\n\n\u003e Note: Following best practices to avoid any issues such as permission issues, I worked from the Linux file system instead of the windows file system (/mnt/)\n\n### Setting up development workspace for Windows users\n\n- Install the WSL extension in VS Code\n- Open your WSL (Ubuntu) terminal and create a directory such as 'GitLab' in your account home directory (~/GitLab)\n- Type ```code .``` to open Visual Studio code.\n- Open the bash terminal from VS Code, make sure you are in the GitLab directory then type ```export GITLAB_HOME=$(pwd)``` to create an environment variable which will save the current working directory to be used by Docker compose.\n- Type ```echo $GITLAB_HOME``` to verify if previous command worked.\n\n### Setting up development workspace for Linux (Ubuntu) users\n\n- Make sure you have similar or later Docker version installed which may also come with Docker Compose V2. If not, manually install Docker Compose V2.\n- Create a directory such as 'GitLab' in your account home directory (~/GitLab) and check into it.\n- Type ```export GITLAB_HOME=$(pwd)``` to create an environment variable which will save the current working directory to be used by Docker compose.\n- Type ```echo $GITLAB_HOME``` to verify if previous command worked.\n\n### Docker Compose yaml file\n\nCreate a ***docker-compose.yml*** file in the *~/GitLab* directory and paste this inside.\n\n```version: '3.6'\nservices:\n  gitlab:\n    image: gitlab/gitlab-ce:latest\n    container_name: gitlab\n    restart: always\n    hostname: gitlab-local\n    environment:\n      GITLAB_OMNIBUS_CONFIG: |\n        # Add any other gitlab.rb configuration here, each on its own line\n        external_url 'http://your-url'\n    ports:\n      - '80:80'\n      - '443:443'\n      - '22:22'\n    volumes:\n      - '$GITLAB_HOME/config:/etc/gitlab'\n      - '$GITLAB_HOME/logs:/var/log/gitlab'\n      - '$GITLAB_HOME/data:/var/opt/gitlab'\n    shm_size: '256m'\n```\n\n- ***image:*** We are pulling the latest version of the GitLab Community Edition container image from DockerHub.\n- ***restart:*** This ensures the container automatically restarts if it crashes or stops.\n- ***environment:***  This defines environment variables for the container. Here, it sets the GITLAB_OMNIBUS_CONFIG variable with a multi-line string. String contains GitLab configuration for external_url. Type ```ip addr show``` to find your ip address for your local machine and use as the external_url.\n- ***ports:***  This maps ports on the host machine to ports inside the container.\n- ***volumes:*** This defines persistent storage for the container. Here, we are mounting three directories from the host machine to directories inside the container.\n- ***shm_size:*** This allocates shared memory size (256MB in this case) for the container.\n\nAfter configuring the docker-compose.yml file, type ```docker compose up -d``` to run the container.\n\nWait for some few minutes, open your browser and type ```http://[your local machine ip address]```\n\nOn the webpage, you will log in with username **root**.\n\nTo get the password, run the command ```sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password```\n\n\u003e Note: File containing password is deleted after 24 hours.\n\nThe image below shows the welcome page on login in.\n![Gitlab Welcome Page](./images/Gitlab%20homepage.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattakenn%2Fgitlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fattakenn%2Fgitlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattakenn%2Fgitlab/lists"}