lblenner
lblenner

Reputation: 452

docker certificate error when building for arm/v7 platform

I have this basic dockerfile which download wget et use it.

FROM ubuntu:20.04

RUN apt-get update && apt-get install -y --no-install-recommends \
    wget libssl-dev ca-certificates \
    && rm -rf /var/lib/apt/lists/*
    
RUN wget -nv https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.bz2

When I try to build it for the platform linux/arm.v7 I get the following error during the wget

DOCKER_BUILDKIT=1 docker buildx build --platform linux/arm/v7 -f test.dockerfile -t image_test folder/
ERROR: cannot verify boostorg.jfrog.io's certificate, issued by 'CN=GeoTrust RSA CA 2018,OU=www.digicert.com,O=DigiCert Inc,C=US':                                    
    Self-signed certificate encountered.                                                                                                                                
To connect to boostorg.jfrog.io insecurely, use `--no-check-certificate'. 

But if I try to build for another platform, no error.

Those two commands succeed

DOCKER_BUILDKIT=1 docker buildx build --platform linux/arm64 -f test.dockerfile -t image_test folder/

dockerbuild -f test.dockerfile -t image_test folder/

The problem happens with any link (even google.com).

Why is docker unable to verify certificates on armv7 ?

Docker version : Docker version 20.10.12, build e91ed57
Docker buildx version : github.com/docker/buildx v0.7.1-docker 05846896d149da05f3d6fd1e7770da187b52a247

Upvotes: 1

Views: 763

Answers (1)

afvmil
afvmil

Reputation: 450

Add

RUN for i in /etc/ssl/certs/*.pem; do HASH=$(openssl x509 -hash -noout -in $i); ln -s $(basename $i) /etc/ssl/certs/$HASH.0; done

before using wget.

I don't know what is the problem with certificates update but apparently this could be a workaround. Found the workaround here

Upvotes: 2

Related Questions