{"id":17094307,"url":"https://github.com/iconoeugen/docker-gitlab-dev","last_synced_at":"2026-04-11T03:15:48.265Z","repository":{"id":151239968,"uuid":"65275708","full_name":"iconoeugen/docker-gitlab-dev","owner":"iconoeugen","description":"Gitlab development environment docker image","archived":false,"fork":false,"pushed_at":"2019-10-29T14:49:44.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T22:51:12.268Z","etag":null,"topics":["developer-tools","development","development-environment","docker","docker-image","gdk","gitlab","gitlab-development-kit","ide","ruby","rubymine"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iconoeugen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-08-09T08:05:31.000Z","updated_at":"2020-02-26T06:48:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"99fcf3bd-ac30-4696-8a84-9a37829a6035","html_url":"https://github.com/iconoeugen/docker-gitlab-dev","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iconoeugen%2Fdocker-gitlab-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iconoeugen%2Fdocker-gitlab-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iconoeugen%2Fdocker-gitlab-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iconoeugen%2Fdocker-gitlab-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iconoeugen","download_url":"https://codeload.github.com/iconoeugen/docker-gitlab-dev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245136355,"owners_count":20566586,"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":["developer-tools","development","development-environment","docker","docker-image","gdk","gitlab","gitlab-development-kit","ide","ruby","rubymine"],"created_at":"2024-10-14T14:22:31.739Z","updated_at":"2025-12-30T20:35:46.086Z","avatar_url":"https://github.com/iconoeugen.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gitlab development environment docker image\n\nA docker image to run Gitlab development environment based on Fedora.\n\n\u003e Based on: [iconoeugen/ruby-dev](https://hub.docker.com/r/iconoeugen/ruby-dev/)\n\n\u003e Using: [gdk](https://gitlab.com/gitlab-org/gitlab-development-kit)\n\n## Environment Variables\n\n- **gitlab_repo**: Gitlab fork repository url. If left empty then the official repository will be cloned (Defaults: \"\")\n- **gitlab_shell_repo**: Gitlab Shell fork repository url. If left empty then the official repository will be cloned (Defaults: \"\")\n- **gitlab_workhorse_repo**: Gitlab Workhorse fork repository url. If left empty then the official repository will be cloned (Defaults: \"\")\n\n## Usage example\n\nAfter configuring the development environment as described in [iconoeugen/fedora-dev](https://github.com/iconoeugen/docker-fedora-dev), you can start\na development container as:\n\n```\ndev run iconoeugen/gitlab-dev\n```\n\nWorking on a fork for example:\n\n```\ndev -e gitlab_repo=https://gitlab.com/myproject/gitlab-ce.git iconoeugen/gitlab-dev\n```\n\n## Prepare development environemnt\n\nExport the following environment variables (change the values to match your envionment) to easily make use of commands\ncopy-paste in following sections:\n\n``` bash\nexport GITLAB_WORK_DIR=~/work/gitlab/hvlad/gitlab-development-kit\nexport GITLAB_REPO=https://gitlab.com/hvlad/gitlab.git\n```\n\nPrepare the development environment on the host system:\n\n``` bash\nmkdir ${GITLAB_WORK_DIR}\n```\n\nRun the development container that will also attach an interactive console to the running container:\n\n``` bash\ndev run -d ${GITLAB_WORK_DIR} -e gitlab_repo=\"${GITLAB_REPO}\" iconoeugen/gitlab-dev\n```\n\nDevelopment URL: (http://localhost:3000)\nDevelopment admin account: `root` / `5iveL!fe`\n\n### More interactive consoles\n\nIf you want to start more interactive consoles that attache to the already running container use the command:\n\n``` bash\ndev exec -d ${GITLAB_WORK_DIR} iconoeugen/gitlab-dev\n```\n\n## Gitlab App\n\nTo execute any of the following command you have to open a development console that is attached to the already\nrunning container:\n\n``` bash\ndev exec -d ${GITLAB_WORK_DIR} iconoeugen/gitlab-dev\n```\n\n### Start Gitlab server\n\nThe Gitlab Server will be reachable at http://localhost:3000 after you execute the following commands:\n\n``` bash\ncd /workspace/gitlab-development-kit\nmake update\ngdk run\n```\n\nUse the default credentials to login:\n\n- User: `root`\n- Password: `5iveL!fe`\n\n### Manage DB\n\n#### Run DB only\n\nThe Postgresql server will not listen on the TCP Port 5432 by default, which can be changed by adding the `localhost` hostname to `postgresql` command the `-h` argument value in the `Procfile`.\n\nTo start the Postgresql and Redis servers:\n\n``` bash\ncd /workspace/gitlab-development-kit\ngdk run db\n```\n\n#### Remove DB data\n\nIf you want to start with a fresh DB the you have to remove all DB data and create a new instance and reintialize the schema:\n\n``` bash\nrm -rf /workspace/gitlab-development-kit/postgresql/data\nmake\n```\n\n#### Troubleshooting\n\n- If you get the error message `FATAL:  role \"postgres\" does not exist` then you have to create the superuser:\n  ``` bash\n  createuser -s postgres -h localhost -p 5432\n  ```\n\n- If you get the error message `ActiveRecord::NoDatabaseError: FATAL:  database \"gitlabhq_development\" does not exist` then install the DB schema:\n  ``` bash\n  cd /workspace/gitlab-development-kit\n  support/bootstrap-rails\n  ```\n\n### Update development environment\n\nIf the configuration files provided with Gitlab development kit you have to regenerate all config file:\n\n``` bash\ncd /workspace/gitlab-development-kit\nmake update\n```\n\n### Delete and regenerate all config files created by GDK\n\nIf the configuration files provided with Gitlab development kit you have to regenerate all config file:\n\n``` bash\ncd /workspace/gitlab-development-kit\ngdk reconfigure\n```\n\n### Compile\n\nThis is an extra dependency for openid connect:\n\n``` bash\necho \"gem 'omniauth-openid-connect',:git =\u003e 'https://github.com/iconoeugen/omniauth-openid-connect.git', :branch =\u003e 'upstream_forks'\" \u003e\u003e /workspace/gitlab-development-kit/gitlab/Gemfile\n```\n\nInstall gem dependencies:\n\n``` bash\ncd /workspace/gitlab-development-kit/gitlab\nbundle install --without mysql production --jobs 4\n```\n\n### Start\n\nDevelopment Procfile mappings to production:\n\n- rails-background-jobs\t=\u003e sidekiq\n- rails-web\t\t=\u003e unicorn\n- gitlab-workhorse\t=\u003e gitlab-workhorse\n\n``` bash\ncd /workspave/gitlab-development-kit\n./run app\n```\n\n#### Troubleshoting\n\n- Git cli not found:\n  ```\n  # curl -v http://localhost:3000\n  ...\n  \u003e No such file or directory - /usr/local/bin/git\n  ```\n  make sure the Git is correctly set:\n  ``` bash\n  sed -e \"s|/usr/local/bin/git|/usr/bin/git|\" -i /workspace/gitlab-development-kit/gitlab/config/gitlab.yml\n  ```\n- Bundle install fails:\n  ```\n  # make\n  ...\n  Cleaning all the gems on your system is dangerous! If you're sure you want to remove every system gem not in this bundle, run `bundle clean --force`.\n  ```\n  make sure bundler is not trying to clean gems:\n  ``` bash\n  sed -e 's|BUNDLE_CLEAN: \"true\"|BUNDLE_CLEAN: \"false\"|' -i /home/default/.gem/config\n  ```\n- Gitaly config error:\n  ```\n  gitaly.1                | level=fatal msg=\"load config\" config_path=/workspace/gitlab-development-kit/gitaly/config.toml error=\"load linguist colors: exit status 1; stderr: \\\"\\\"\"\n  ```\n  This can be due to missing Gem required by Gitaly:\n  ``` bash\n  cd /workspace/gitlab-development-kit/gitaly/ruby\n  bundle install --without mysql production --jobs 4\n  bundle update\n  cd /workspace/gitlab-development-kit/gitaly/src/gitlab.com/gitlab-org/gitaly\n  make\n  cd /workspace/gitlab-development-kit/gitaly/src/gitlab.com/gitlab-org/gitaly-proto\n  make\n  ```\n  If the following error occures:\n  ```\n  Could not find grpc-tools-1.0.1 in any of the sources\n  ```\n  then execute the command and retry previous steps:\n  ```\n  cd /workspace/gitlab-development-kit/gitaly/src/gitlab.com/gitlab-org/gitaly-proto/_support\n  bundle install\n  ```\n- Rails web error:\n  ```\n  rails-web.1             | E, ERROR -- : getaddrinfo: Name or service not known (SocketError)\n  ```\n  Change hostnames to localhost:\n  ```bash\n  sed -e \"s/port 0/port 6379/\" -i /workspace/gitlab-development-kit/redis/redis.conf\n  cd /workspace/gitlab-development-kit/gitlab/config\n  mv redis.cache.yml redis.cache.yml.orig\n  cp redis.cache.yml.example redis.cache.yml\n  mv redis.queues.yml redis.queues.yml.orig\n  cp redis.queues.yml.example redis.queues.yml\n  mv redis.shared_state.yml redis.shared_state.yml.orig\n  cp redis.shared_state.yml.example redis.shared_state.yml\n  mv resque.yml resque.yml.orig\n  cp resque.yml.example resque.yml\n  mv database.yml database.yml.orig\n  cp database.yml.postgresql database.yml\n  ```\n  If problem still persists, and you get the error:\n  ``` bash\n  cd /workspace/gitlab-development-kit/gitlab \u0026\u0026 bundle exec rake gettext:compile \u003e /workspace/gitlab-development-kit/gettext.log 2\u003e\u00261\n  make: *** [Makefile:107: .gettext] Error 1\n  ```\n  then add the following line to `/etc/hosts`:\n  ``` bash\n  # Gitlab development\n  127.0.0.1       postgres redis\n  ```\n\n- Gitaly connect error:\n  ```\n  Failed to connect to Gitaly...\n  Error: 14:Connect Failed\n  ```\n  Change connect socket:\n  ```bash\n  mv /workspace/gitlab-development-kit/gitlab/tmp/tests/gitaly/config.toml /workspace/gitlab-development-kit/gitlab/tmp/tests/gitaly/config.toml.orig\n  cp /workspace/gitlab-development-kit/gitlab/tmp/tests/gitaly/config.toml.example /workspace/gitlab-development-kit/gitlab/tmp/tests/gitaly/config.toml\n  sed -e \"s|\\(.*gitaly_address: unix:\\).*|\\1/workspace/gitlab-development-kit/gitaly.socket|\" -i /workspace/gitlab-development-kit/gitlab/config/gitlab.yml\n  ```\n\n### Check running app\n\nNavigate in a browser to Gitlab homepage: (http://localhost:3000/)\n\n## Test\n\n- RSpec: https://www.jetbrains.com/help/ruby/8.0/using-rspec-in-ruby-projects.html\n\n### Prepare environment\n\n``` bash\ncd /workspace/gitlab-development-kit/gitlab\n. ./scripts/utils.sh\n. ./scripts/prepare_build.sh\n./scripts/gitaly-test-spawn\n```\n\n### Compile web assets\n\n``` bash\nexport NODE_OPTIONS=\" --max_old_space_size=4096 \"\ncd /workspace/gitlab-development-kit/gitlab\nbundle exec rake yarn:install\nbundle exec rake gitlab:assets:compile\n#bundle exec rake webpack:compile\n```\n\n### Runs RSpec\n\n``` bash\nbundle exec rspec spec/lib/gitlab\n```\n\nTo execute only one spec file, just provide it to the command line:\n\n``` bash\nbundle exec rspec spec/lib/gitlab/auth/o_auth/user_spec.rb\n```\n\n## Using RubyMine\n\nRubyMine is comercial Cross-platform intelligent IDE for productive Ruby / Rails development that allows a trial phase\nof 30 days or requires a license to activate.\n\n### Install IDE\n\nInside development container:\n\n``` bash\nexport RUBYMINE_VERSION=\"2017.1.2\"\ncurl -L https://download-cf.jetbrains.com/ruby/RubyMine-${RUBYMINE_VERSION}.tar.gz | tar xvz -C ~/\nunlink ~/RubyMine\nln -s ~/RubyMine-${RUBYMINE_VERSION} ~/RubyMine\n```\n\n### Start IDE\n\nStart RubyMine inside development container:\n\n``` bash\n/home/default/RubyMine/bin/rubymine.sh\n```\n\n### Configure IDE\n\n#### Open new project\n\nOpen a new project located at:\n\n``` bash\n/workspace/gitlab-development-kit/gitlab\n```\n\n#### Configure\n\n- Configure DB\n\n  Edit file `/workspce/gitlab-development-kit/Procfile` the `postgresql:` line:\n\n  ``` bash\n  sed -e \"s/-h ''/-h '0.0.0.0'/\" -i /workspace/gitlab-development-kit/Procfile\n  #sed -e \"s|/home/git|/workspace/gitlab-development-kit\" -i Procfile\n  ```\n\n  Enable Database Tools: `Menu -\u003e View -\u003e Tool Windows -\u003e Database`:\n  1. Open Properties dialog for `Rails gitlab: development`:\n  1. Import drivers from Drivers -\u003e PostgreSQL tab (on left side)\n  1. Configure Imported Data Source and test connection\n    * Host: `localhost`\n    * Port: `5432`\n    * Database: `gitlabhq_development`\n    * User: `\u003cshell_user_name\u003e`\n    * Password: `\u003cempty\u003e`\n\n- Debug gitlab unicorn\n\n  Comment out the `rails-web` lines in `/workspace/Procfile` to avoid `./run app` starting unicorn.\n\n  ``` bash\n  sed -e \"s/rails-web:/#rails-web:/\" -i /workspace/gitlab-development-kit/Procfile\n  ```\n\n  Edit run configuration: `Menu -\u003e Run -\u003e Edit Configurations`:\n  1. Open Properties dialog for ` Rails -\u003e Development: gitlab`\n  1. Select Configuration Tab\n    * Server: `Unicorn`\n    * IP addr: `0.0.0.0`\n    * Port: `3001`\n    * Server args: `-c /workspace/gitlab-development-kit/gitlab/config/unicorn.rb`\n    * Environment: `development`\n    * Dummy app: `test/dummy`\n    * Run browser: `Unchecked`\n      * `http://localhost:3001`\n      * `Unchecked` Start Javascript debuger\n  1. Bundler Tab\n    * Run the script in context of the bundle: `Checked`\n\n  ### Run Debug\n\n  Edit run configuration: `Menu -\u003e Run -\u003e Debug Development: gitlab`\n    \n  #### Troubleshooting\n\n  If the debuger complanis about missing symbol `ibf_load_iseq_complete` then try:\n    \n  ``` bash\n  gem install debase -v 0.2.3.beta5\n  gem install ruby-debug-ide -v 0.7.0.beta7  \n  gem uninstall --user-install ruby-debug-ide    \n  ``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficonoeugen%2Fdocker-gitlab-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficonoeugen%2Fdocker-gitlab-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficonoeugen%2Fdocker-gitlab-dev/lists"}