Entry Point Script Bugs
Summary
When executing the container with a custom CA file specified in /etc/gitlab-runner/certs/ca.crt
the entrypoint.sh script generates errors.
Steps to reproduce
On a Docker enabled Linux system (in my case, RHEL 8.7) pull registry1.dso.mil/ironbank/gitlab/gitlab-runner/gitlab-runner:v15.8.1 and execute the following:
docker run -u 0:0 -d --name gitlab-runner --restart always \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
registry1.dso.mil/ironbank/gitlab/gitlab-runner/gitlab-runner:v15.8.1
What is the current bug behavior?
If I check the logs using docker logs gitlab-runner
, I can see errors generated by entrypoint.sh. The cmp
and update-ca-certificates
commands cannot be found.
What is the expected correct behavior?
entrypoint.sh should print "Updating CA certificates..." then update the CA certificates to be used by the container.
Relevant logs and/or screenshots
/entrypoint: line 19: cmp: command not found
Updating CA certificates...
cp: cannot create regular file '/usr/local/share/ca-certificates/ca.crt': No such file or directory
/entrypoint: line 14: update-ca-certificates: command not found
Runtime platform arch=amd64 os=linux pid=7 revision=f86890c6 version=15.8.1
Starting multi-runner from /etc/gitlab-runner/config.toml... builds=0
Running in system-mode.
Possible fixes
I loaded the base image used in the Dockerfile and it did not have the cmp command or the update-ca-certificates command installed. If these commands could be added to the ubi image via the Dockerfile, or other commands could be used instead, the problem should be fixed.
Tasks
-
Bug has been identified and corrected within the container