Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Deploy virtual server in Portal (skip this section if you already have a server)
    1. See article for instructions
  2. Install Docker engine on server ()
    1. Step by step (official instructions) 
      1.  Set up the repository

        Code Block
        languagebash
        $: sudo dnf -y install dnf-plugins-core
        $: sudo dnf config-manager  --add-repo https://download.docker.com/linux/fedora/docker-ce.repo


      2. Install Docker Engine

        Code Block
        languagebash
        $: sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin


    2. Convenience script (official instructions) - recommended only for testing and development purposes

      Code Block
      languagebash
       curl -fsSL https://get.docker.com -o get-docker.sh
       sudo sh get-docker.sh


  3. Start docker container with latest version of gitlab runner (official instructions)

    Code Block
    languagebash
    $: docker run -d --name gitlab-runner --restart always \
      -v /srv/gitlab-runner/config:/etc/gitlab-runner \
      -v /var/run/docker.sock:/var/run/docker.sock \
      gitlab/gitlab-runner:latest


  4. Configure GitLab runner to connect to your repository
    1. In your GitLab repository, go to SettingsCI/CDRunners
    2. You will need URL and registration token from Set up a specific runner for a project section
    3. Call following on the server with running docker container

      Code Block
      languagebash
      docker exec -it gitlab-runner gitlab-runner register --docker-privileged


    4. You will be prompted to fill-in following parameters:
      1. URL from step 4.c.
      2. Token from step 4.c.
      3. Description
      4. Tags for the runner (can leave this blank for the moment).
      5. Specify docker executor
      6. Specify a default Docker image (e.g. alpine:latest)