I have recently set up the ‘runner in a container’ on my laptop using the instructions provided in order to carry out some integration tests on my development work in a GitLab project.
Everything sets up correctly and once the runner is registered I am able to run my CI/CD with my configuration file as expected, including all of the services needed to run my integration tests.
However, one my laptop powers down overnight and I log back on the next morning, the gitlab-runner container is still running but in my settings the runner is ‘offline, last contact x hours ago’.
I have seen various posts online about restarting or verifying runners to start them back up again but this uses the standard gitlab-runner command rather than the docker command. I tried restarting the container to activate it again but this removed the config.toml file, meaning that every time I want to run my tests I need to re-register the runner.
I’d just like to clarify whether this is the expected behaviour, that once the host of the container goes down I need to reregister the runner? Or is there a docker command (similar to
gitlab-runner verify) that can restart my existing runner?