Dockerfile based on gitlab-ci-multi-runner Dockerfile using phusion/baseimage-docker as base image.
docker build -t baseimage-gitlab-runner .
Adjust $HOME/baseimage-runner/config
for your needs or create that path to persist gitlab-runner's configuration with mkdir -p $HOME/baseimage-runner/config
docker run -d --name baseimage-gitlab-runner \
--restart always \
-v $HOME/baseimage-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
baseimage-gitlab-runner
docker exec -it baseimage-gitlab-runner gitlab-runner register