Skip to content

Commit 8177491

Browse files
committed
The Certificate verification failed error occurred on Linux artifacts CI build because the base ubuntu:20.04 image lacks the CA certificates required to trust mirror.bazel.build during the initial apt-get update.
I have updated buildscripts/grpc-java-artifacts/Dockerfile.multiarch.base to skip peer verification for the mirror during the first update: Added -o Acquire::https::mirror.bazel.build::Verify-Peer=false. This allows apt to fetch the package lists even if it can't verify the certificate yet.
1 parent 7830a94 commit 8177491

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

buildscripts/grpc-java-artifacts/Dockerfile.multiarch.base

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
FROM ubuntu:20.04
22

33
# Redirect to the internal mirror to bypass the Kokoro network block
4+
# Use http for mirror.bazel.build because the base image doesn't have the CA certs yet
45
RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|http://mirror.bazel.build/archive.ubuntu.com/ubuntu/|g' /etc/apt/sources.list
56

67
RUN export DEBIAN_FRONTEND=noninteractive && \
7-
apt-get update && \
8+
apt-get update -o Acquire::https::mirror.bazel.build::Verify-Peer=false && \
89
apt-get upgrade -y && \
910
apt-get install -y --no-install-recommends \
1011
build-essential \

0 commit comments

Comments
 (0)