How to configure self-managed runner that would run jobs using virtual machine docker

Hello. I am very new to all this CI/CD thing. I am currently learning how to speed up and automate some of our development using CI/CD jobs.

What I am trying to achieve:

We host our own GitLab server. Lets say I have a team of developers working on a project. We want to be able to trigger some jobs for example when we push a commit with a specific tag name.

We also have a Ubuntu server that we specifically use for testing, we have various services running there such as Samba, webserver and etc…

In that Ubuntu server, I have installed docker using the following command:
sudo apt install docker.io

After the installation, I have also confirmed whether the installation was successfull:

sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
719385e32844: Pull complete
Digest: sha256:c79d06dfdfd3d3eb04cafd0dc2bacab0992ebc243e083cabe208bac4dd7759e0
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

I have read :

But it is still not fully clear to me how can I create runner that would execute docker in my virtual machine (192.168.3.44)

I have followed runner installation instructions:

and created runner that uses docker executor. My config.toml:

concurrent = 1
check_interval = 0
shutdown_timeout = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "test runner for docker"
  url = "https://ems-gitlab.teltonika.lt/"
  id = 4
  token = "xJVmr5FjRKYVnxqKCZGt"
  token_obtained_at = 2023-12-04T09:45:35Z
  token_expires_at = 0001-01-01T00:00:00Z
  executor = "docker"
  [runners.cache]
    MaxUploadedArchiveSize = 0
  [runners.docker]
    tls_verify = false
    image = "ruby:2.7"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0
    network_mtu = 0

But from what I understand, this runner assumes that I have docker installed locally on my machine which is not the case. How can I modify this runner to run jobs from my virtual machine docker? Appreciate any help!

You need to install gitlab-runner on the Ubuntu server (and given that your screenshot shows the windows installation instructions, I guess you haven’t) where docker is installed.

Then you need to register a new runner on that Ubuntu server.

Yeah that was quite silly of me. I have installed docker and the gitlab-runner on the VM (the same one where the Gitlab server is running). After attaching a runner to a project, everything works as expected.