title: GPG error The following signatures couldn't be verified because the public key is not available
body: <p>I'm following <a href="https://docs.docker.com/engine/install/debian/" rel="nofollow noreferrer">this</a> guide for the installation of Docker inside a Jenkins container</p>
  <p>This is the Dockerfile of the Jenkins container:</p>
  <pre><code>FROM jenkins:1.596
   
  USER root
  RUN apt-get update
  RUN echo &quot;jenkins ALL=NOPASSWD: ALL&quot; &gt;&gt; /etc/sudoers
  
  # setup docker repository
  RUN apt-get install
  RUN apt-get update
  
  RUN echo &quot;deb http://httpredir.debian.org/debian jessie-backports main contrib non-free&quot; &gt;&gt; /etc/apt/sources.list
  
  RUN apt-get update
  
  RUN apt-transport-https \
      &amp;&amp; ca-certificates \
      &amp;&amp; curl \
      &amp;&amp; gnupg-agent \
      &amp;&amp; software-properties-common
  
  RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
  RUN apt-key fingerprint 0EBFCD88
  
  RUN add-apt-repository \
     &quot;deb [arch=amd64] https://download.docker.com/linux/debian \
     $(lsb_release -cs) \
     stable&quot;
     
  # install docker engine
  RUN apt-get update
  RUN apt-get install docker-ce docker-ce-cli containerd.io
  
  USER jenkins
  </code></pre>
  <p>When I build the image I get these errors:</p>
  <pre><code>Reading package lists...
  W: GPG error: http://security.debian.org jessie/updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9D6D8F6BC857C906 NO_PUBKEY AA8E81B4331F7F50
  W: GPG error: http://http.debian.net jessie-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010
  W: GPG error: http://http.debian.net jessie Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010
  </code></pre>