colima: How to add trust unknown ssl authority or manually download and use iso
Is it possible to skip ssl check? We are using antivirus with MITM ssl certificate.
colima start --cpu 6 --memory 8 --disk 60 | more
INFO[0000] starting colima
INFO[0000] starting ... context=vm
time="2022-01-18T13:17:29+01:00" level=info msg="Using the existing instance \"colima\""
time="2022-01-18T13:17:29+01:00" level=info msg="Attempting to download the image from \"https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.3.2/alpine-lima-clm-3.14.3-x86_64.iso\"" digest="sha512:875482176ff2f43bf9472f84137d8b9a56d692ae19243436079c7f2f78cb6b13576601eef9102aaea796629215fc60308e69b590c81fe4139e9e84f1ec4a57f5"
time="2022-01-18T13:17:29+01:00" level=fatal msg="failed to download the image, attempted 2 candidates, errors=[unsupported arch: \"aarch64\" failed to download \"https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.3.2/alpine-lima-clm-3.14.3-x86_64.iso\": Get \"https://objects.githubusercontent.com/github-production-release-asset-2e65be/422815134/912100a2-63cc-4bb2-ac99-e0940a5af5f5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220118%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220118T121636Z&X-Amz-Expires=300&X-Amz-Signature=3d7b0a81026ed973ff0a64b8d9141f6104dcc775c35d2300dffc4c1283379e6d&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=422815134&response-content-disposition=attachment%3B%20filename%3Dalpine-lima-clm-3.14.3-x86_64.iso&response-content-type=application%2Foctet-stream\": x509: certificate signed by unknown authority]"
FATA[0000] error starting vm: error at 'starting': exit status 1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 53 (10 by maintainers)
Commits related to this issue
- fixes #131: expose docker certs to vm — committed to abiosoft/colima by abiosoft 5 years ago
- Fixes #131: expose docker certs to the VM — committed to abiosoft/colima by abiosoft 5 years ago
- fixes #131: expose docker certs to vm — committed to abiosoft/colima by abiosoft 5 years ago
- Fixes #131: expose docker certs to the VM — committed to abiosoft/colima by abiosoft 5 years ago
- Prepare for v0.3.3 (#174) * core: add configurable dns * core: update nerdctl to 0.16.1 * fixes #131: expose docker certs to vm * core: copy registry certs for all runtimes * containerd: ... — committed to abiosoft/colima by abiosoft 5 years ago
This is what worked for me, mostly based on @momo182, to automatically pull the mitm certificate and trust it. The reason for doing it this way is:
Initially,
docker pull hello-worldfails with tls errorerror pulling image configuration: download failed after attempts=6: tls: failed to verify certificate: x509: certificate signed by unknown authority. You can plug in this one-liner to trust whatever certs https registry.hub.docker.com serves automatically:Now, you can test and
docker pull hello-worldshould succeed. You’ll have to stick something similar in your Dockerfile, here it is not as a one-liner for readability (and might be different depending on base image):Of course, the base Ubuntu and other images don’t always have the tools installed, but to install them using apt-get or dnf you’ll need to pull them from secure repos. You can probably inject certs or tools from the host or do it manually, but can just pull the tools usually ignoring insecure certificates.
here’s what i did to have it fixed:
Hello all, I am on macOS and created this script which resolved SSL issues for me. It exports the root certificates from the macOS Keychain, configures Colima to use these certificates, and restarts the Docker daemon. Sharing in case it proves helpful to someone else.
For those on Mac, I figured out the process. You’ve to just manually update the default template file by running
colima templateand then edit thedocker: {}to– bump
How can I add my corp cert into the VM so that it can pull down images?
I had the same issue and was able to resolve it cleanly with a variation of the above for colima.
I would copy the certificate to
/usr/local/share/ca-certificatesand then run/usr/sbin/update-ca-certificates, followed byrc-service docker restart(based on my knowledge of the Alpine image; not sure if colima needs something in addition).For MacOS, this did the trick for me:
cp ca_keychain.pem $HOME/.docker/certs.dI was unable to docker pull, but the following steps solved the problem. Maybe this will help.
The cause was VPN software, but the situation was the same as the Avast case described in this comment.
Fortunately, I was able to get the cert file and used it (hereafter referred to as
xxx.crt).I think you are basically doing the same thing with your comment here.
on a similar issue, i had been encountering issues with my new proxy. To fix it, i did the following:
This worked for me on MacOS Sequoia.
I found the Keychain Access app is still available at
/Library/CoreServices/Applicationsso I opened it from there in Finder, exported my company’s internal root certificate to my home directory, then sudo copied it to/usr/local/share/ca-certificates/companyname.crt(file extension is apparently important, asupdate-ca-certificateswill ignore files with .pem extension)Then I ran
sudo update-ca-certificatesand restarted the VM as instructed, and now I can pull again. Thank you!it doesn’t seem that colima is respecting host certs, such as
/etc/docker/certs.d/*. Using Colima with a private registry gives me thisThis is with latest (as of today)
This worked for me instead of creating a dir named after the cert URI as stated in Docker docs.
The workarounds worked on 0.5.6, but don’t appear to work on 0.6.x.
Was not able to resolve this with any of the above workarounds
Hi, I went with the unsecure approach but maybe this pages help:
Self signed: https://docs.docker.com/registry/insecure/#use-self-signed-certificates
Unsecure: https://docs.docker.com/registry/insecure/#deploy-a-plain-http-registry
Every change using
colima templaterequires acolima stop,colima start. You can check the status of the colima instance by executinglimactl shell colimaand then:At the moment, it can only be configured via the config file.