Hi,
I’m tryng to configure gitlab-runner with docker. This is my Dockerfile:
FROM gitlab/gitlab-runner
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install ca-certificates
RUN apt-get -y install curl
RUN rm -rf /var/cache/apk/*
RUN mkdir -p /usr/local/share/ca-certificates
COPY gitlab-ca.crt /etc/gitlab-runner/certs/gitlab-ca.crt
RUN chmod 644 /etc/gitlab-runner/certs/gitlab-ca.crt
RUN update-ca-certificates
After compilation I run the container with the -d option and then launch the gitlab-runner command, immediately after entering the registration token I receive the error:
Runtime platform arch=amd64 os=linux pid=14 revision=fe451d5a version=17.1.0
Running in system-mode.
Verifying runner... is valid runner=zhKUpZD_W
PANIC: Failed to verify the runner.
The url (ping and curl) is ok:
docker exec -it $(docker ps -aqf "name=gitlab-runner") ping gitlab.server
PING gitlab.rosetta.ericssondevops.com (xxx.xxx.xxx.xxx) 56(84) bytes of data.
64 bytes from gitlab.rosetta.ericssondevops.com (xxx.xxx.xxx.xxx): icmp_seq=1 ttl=52 time=20.0 ms
docker exec -it $(docker ps -aqf "name=gitlab-runner") curl -v -I https://gitlab.server/
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* Connection #0 to host gitlab.server left intact
What I can to check for know the problem?
Thanks
Regards
Giulio