I am trying to upgrade from ubuntu16 to ubuntu20 and for that I need to change image arm32v7/ubuntu:16.04 to arm32v7/ubuntu:20.04 in all our Dockerfiles [update required libraries after that], But while working on this task I found that there's some issue with arm32v7 base image of ubuntu:20.04 - when I run apt-get update it fails with following error messages-
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
At least one invalid signature was encountered.
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB]
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
At least one invalid signature was encountered.
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
At least one invalid signature was encountered.
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
I tried the solution mentioned here [https://askubuntu.com/a/1264921/872700] but that too is not working as we are using the image in Dockerfile and its not allowed to pass --security-opt in docker build command.
As a workaround I ran docker run with --security-opt option and created another image with docker commit - then ran apt-get update inside new image but that too is not working.
FYI, The machine has following docker version on it-
Docker version 19.03.13, build 4484c46