clemlesne / blue-agent

Deploy Azure Pipelines agent on Kubernetes. Easy way. Cheap. Windows and Linux.
https://clemlesne.github.io/blue-agent/
Apache License 2.0
43 stars 12 forks source link

Correct way to install additional software to docker image? #306

Closed biggiethehacker closed 2 hours ago

biggiethehacker commented 2 hours ago

I am trying to add a few additional software (helm, kubernetes etc.) to the blue-agent docker image but I am unable to do so because the download command is unable to verify the local issuer certificate. This also happen with any curl based downloads. Any idea how to fix this?

Example Dockerfile:

FROM docker.io/clemlesne/blue-agent:bookworm-7.1.2

RUN apt-get update && \
    apt-get install -y ca-certificates && \
    apt-get clean

RUN az aks install-cli

Example Error:

#6 [3/3] RUN az aks install-cli
#6 25.23 WARNING: The detected architecture of current device is "x86_64", and the binary for "amd64" will be downloaded. If the detection is wrong, please download and install the binary corresponding to the appropriate architecture.
#6 25.23 WARNING: No version specified, will get the latest version of kubectl from "https://storage.googleapis.com/kubernetes-release/release/stable.txt"
#6 26.67 ERROR: The command failed with an unexpected error. Here is the traceback:
#6 26.81 ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)>
....
biggiethehacker commented 2 hours ago

Closing as this is a duplicate of #307