K3os and GitLab Runner integration

I’ve installed k3os on metal, I’ve then pointed my Gitlab to the kubernetes cluster.

i’m able to install Helm Tiller via gitlab, I then go on to install “GitLab Runner”.

However that’s where things fail. I commit new code and the CI picks up the job and tries to swamp a container to build the project. This fails as it’s not able to find docker.

docker build -t $CONTAINER_BRANCH_IMAGE .

41 time=“2020-07-15T10:38:52Z” level=error msg=“failed to dial gRPC: cannot connect to the Docker daemon. Is ‘docker daemon’ running on this host?: dial unix /var/run/docker.sock: connect: no such file or directory”

42 error during connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=py8ctit3ac1jwt56jlfafoww3&shmsize=0&t=gitlab.int.britewhite.net%3A5005%2Fhome%2Fdns-master%3Amaster&target=&ulimits=null&version=1: context canceled

44Running after_script

00:00

46Uploading artifacts for failed job

00:00

48 ERROR: Job failed: command terminated with exit code 1

So in a K3os world how do we make use of gitlab runner to build docker containers?

Thanks
–Guy

Personnally, I switched from docker build to kaniko, as suggested in the Gitlab’s documentation: https://docs.gitlab.com/ce/ci/docker/using_kaniko.html

Curious if you’re using GitLabs “cloud native” images: GitLab.org / Build / CNG · GitLab
Or their default chef-based “omnibus”?

We have multiple Gitlab, running from K8S, Omnibus or Docker. Gitlab-runner are generally running on K3OS so with the Docker images provided by Gitlab.