The other workaround I have found is to copy a CA bundle into a file at /etc/ssl/cert.pem on the Fedora host.
Fedora has the CA bundles originally as follows:
/etc/ssl/ has one sym link certs (nothing else), and certs is a symbolic link to /etc/pki/tls/certs dir, which then has two cert bundles
ca-bundle.crt -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
ca-bundle.trust.crt -> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
Also, /etc/pki/tls/ has a cert.pem -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem.
I tried it on another non-Alpine host (Gentoo, which yet arranges the CA bundles differently) and do not have the issue, so must be related to Fedora's way of arranging the CA bundles. Maybe the issue is in the static APK tools' logic to locate the cert bundle.
Using the script on a Fedora F31 host. Invocation as follows:
$ sudo ./alpine-make-vm-image -p dropbear -c -f qcow2 ./alpine-latest-stable-virt.qcow2 ./setup.sh
The error is on this line, which is the 1st invocation of apk:
For now I specified the repository URL / mirror URI as an option with http only, so my invocation looks like this to get around it:
$ sudo ./alpine-make-vm-image --mirror-uri http://nl.alpinelinux.org/alpine -p dropbear -c -f qcow2 ./alpine-latest-stable-virt.qcow2 ./setup.sh
The other workaround I have found is to copy a CA bundle into a file at /etc/ssl/cert.pem on the Fedora host. Fedora has the CA bundles originally as follows: /etc/ssl/ has one sym link certs (nothing else), and certs is a symbolic link to /etc/pki/tls/certs dir, which then has two cert bundles ca-bundle.crt -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem ca-bundle.trust.crt -> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt Also, /etc/pki/tls/ has a cert.pem -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem.
I tried it on another non-Alpine host (Gentoo, which yet arranges the CA bundles differently) and do not have the issue, so must be related to Fedora's way of arranging the CA bundles. Maybe the issue is in the static APK tools' logic to locate the cert bundle.