项目作者: stephane-klein

项目描述 :
Vagrant environment to test sameersbn/docker-gitlab Docker image.
高级语言: Shell
项目地址: git://github.com/stephane-klein/docker-gitlab-vagrant-test.git


Vagrant environment to test sameersbn/docker-gitlab Docker image

Vagrant environment to test sameersbn/docker-gitlab Docker image.

This installation mix the dockerized gitlab-ce ssh port with ssh on server host.

This configuration is based on Exposing ssh port in dockerized gitlab-ce post.

This repository is a #1517 example, see expose-gitlab-ssh-port.sh configuration script.

GitLab Container Registry is enabled.

Prerequisites

On OSX, execute this command with brew to install this prerequisite:

  1. $ brew cask install vagrant virtualbox
  2. $ brew install pwgen
  3. $ vagrant plugin install vagrant-hostmanager --plugin-version 1.8.9
  4. $ vagrant plugin install vagrant-disksize

On ArchLinux:

  1. $ sudo pacman -S virtualbox vagrant virtualbox-host-modules-arch net-tools pgwen

Be careful, don’t forget to install net-tools (more info)

Start VM

  1. $ ./container-registry.sh
  2. $ ./gen-secrets.sh
  3. $ (cd nginx-proxy && ./generate-certificates.sh)
  4. $ vagrant up

Wait http://gitlab.example.com is ready:

  1. $ while [[ "$(curl -s -o /dev/null -w '%{http_code}' -k https://gitlab.example.com/)" == "502" ]]; do sleep 1; done

Next instruction to test git clone:

  1. Browse to http://gitlab.example.com and define your root user password.
  2. Upload your ssh public key in http://gitlab.example.com/profile/keys
  3. Create new project named test1 http://gitlab.example.com/projects/new
  4. Add README.md file to http://gitlab.example.com/root/test1 project
  5. Clone the project:
  1. $ git clone git@gitlab.example.com:root/test1.git
  2. Cloning into 'test1'...
  3. remote: Enumerating objects: 3, done.
  4. remote: Counting objects: 100% (3/3), done.
  5. Receiving objects: 100% (3/3), 217 bytes | 217.00 KiB/s, done.
  6. remote: Total 3 (delta 0), reused 0 (delta 0)

Success 👍