I'm setting up a self hosted runner behind a self-signed SSL network. I have customed runner image with our SSL certificate, and it connected to BitBucket successfully. The image that is used in `bitbucket-pipelines.yml` is also customed with SSL certificate. But when triggering new pipeline run, the new spawn container still couldn't clone the repo in `Build setup` (image below)
My `Dockerfile` looks like
RUN apt install ca-certificates -y
COPY ab.pem /usr/local/share/ca-certificates/ab.crt
RUN update-ca-certificates
RUN cp /usr/local/share/ca-certificates/ab.pem $JAVA_HOME/lib/security/ && cd $JAVA_HOME/lib/security && keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias ldapcert -file ab.pem
Hi Dao Duc and welcome to the community!
I believe this issue may occur because when you use a self-hosted Linux Docker runner, the Build setup doesn't take place in the runner's container or the step's build container (for the image you define in your bitbucket-pipelines.yml). There is a separate Docker container that starts, where the Build setup takes place and the repo is cloned, and the clone directory from this container is then mounted to the step's build container.
The following documentation lists the additional images used by the runner, look for the list with the PAUSE_IMAGE, AUTH_PROXY_IMAGE, and CLONE_IMAGE:
I believe you may need to use custom images with your SSL certificate for these three images as well, and then adjust the command that starts the runner as per the example in the documentation, so that these images are used.
Kind regards,
Theodora
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.