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.
- Virtualbox (tested with
6.1.30
) - Vagrant (tested with
2.2.19
) - pwgen
- vagrant-hostmanager plugin
On OSX, execute this command with brew to install this prerequisite:
$ brew cask install vagrant virtualbox
$ brew install pwgen
$ vagrant plugin install vagrant-hostmanager --plugin-version 1.8.9
$ vagrant plugin install vagrant-disksize
On ArchLinux:
$ sudo pacman -S virtualbox vagrant virtualbox-host-modules-arch net-tools pgwen
Be careful, don't forget to install net-tools
(more info)
$ ./container-registry.sh
$ ./gen-secrets.sh
$ (cd nginx-proxy && ./generate-certificates.sh)
$ vagrant up
Wait http://gitlab.example.com is ready:
$ 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
:
- Browse to http://gitlab.example.com and define your
root
user password. - Upload your ssh public key in http://gitlab.example.com/profile/keys
- Create new project named
test1
http://gitlab.example.com/projects/new - Add
README.md
file to http://gitlab.example.com/root/test1 project - Clone the project:
$ git clone [email protected]:root/test1.git
Cloning into 'test1'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
Receiving objects: 100% (3/3), 217 bytes | 217.00 KiB/s, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Success 👍