title: GPG invalid signature error while running apt update inside arm32v7/ubuntu:20.04 docker
body: <p>I am trying to upgrade from ubuntu16 to ubuntu20 and for that I need to change image <code>arm32v7/ubuntu:16.04</code> to <code>arm32v7/ubuntu:20.04</code> 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 <code>apt-get update</code> it fails with following error messages-</p>
  <pre><code>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.
  </code></pre>
  <p>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 <code>--security-opt</code> in <code>docker build</code> command.</p>
  <p>As a workaround I ran <code>docker run</code> with <code>--security-opt</code> option and created another image with <code>docker commit</code> - then ran <code>apt-get update</code> inside new image but that too is not working.</p>
  <p>FYI, The machine has following docker version on it-
  <code>Docker version 19.03.13, build 4484c46</code></p>