title: public key is not available: NO_PUBKEY F76221572C52609D
body: <p>For the below docker file:</p>
  
  <pre><code>FROM microsoft/aspnetcore-build:1.0.1
  
  ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1
  
  # This is FROM openjdk:8-jdk  
  RUN apt-get update &amp;&amp; apt-get install -y --no-install-recommends \
          bzip2 \
          unzip \
          xz-utils \
                  apt-transport-https \
      &amp;&amp; rm -rf /var/lib/apt/lists/*
  
  RUN echo 'deb http://deb.debian.org/debian jessie-backports main' &gt; /etc/apt/sources.list.d/jessie-backports.list
  RUN echo 'deb https://apt.dockerproject.org/repo debian-jessie main' &gt; /etc/apt/sources.list.d/docker.list
  
  # Default to UTF-8 file.encoding
  ENV LANG C.UTF-8
  
  # add a simple script that can auto-detect the appropriate JAVA_HOME value
  # based on whether the JDK or only the JRE is installed
  RUN { \
          echo '#!/bin/sh'; \
          echo 'set -e'; \
          echo; \
          echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \
      } &gt; /usr/local/bin/docker-java-home \
      &amp;&amp; chmod +x /usr/local/bin/docker-java-home
  
  ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
  
  ENV JAVA_VERSION 8u111
  ENV JAVA_DEBIAN_VERSION 8u111-b14-2~bpo8+1
  
  # see https://bugs.debian.org/775775
  # and https://github.com/docker-library/java/issues/19#issuecomment-70546872
  ENV CA_CERTIFICATES_JAVA_VERSION 20140324
  
  RUN set -x \
      &amp;&amp; apt-get update \
      &amp;&amp; apt-get install -y \
          openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \
          ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \
      &amp;&amp; rm -rf /var/lib/apt/lists/* \
      &amp;&amp; [ "$JAVA_HOME" = "$(docker-java-home)" ]
  
  # see CA_CERTIFICATES_JAVA_VERSION notes above
  RUN /var/lib/dpkg/info/ca-certificates-java.postinst configure
  
  ##### END OF THE JDK
  
  ##### START Jenkins Slave Node Config settings
  
  # Create Jenkins User
  RUN useradd jenkins -m -s /bin/bash
  
  RUN chown -R jenkins /home/jenkins
  RUN chgrp -R jenkins /home/jenkins
  RUN chown -R jenkins /tmp
  RUN chgrp -R jenkins /tmp
  
  # Add the jenkins user to sudoers
  RUN echo "jenkins    ALL=(ALL)    ALL" &gt;&gt; etc/sudoers
  
  # Must install docker to create docker images from docker container. Inception. Head... hurts.
  # container must be called with -v /var/run/docker.sock:/var/run/docker.sock
  RUN apt-get install -y --no-install-recommends apt-transport-https ca-certificates
  RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
  RUN apt-get update &amp;&amp; apt-get install -y --no-install-recommends \
      docker-engine \
  &amp;&amp; rm -rf /var/lib/apt/lists/*
  
  # This must run after the docker install 
  RUN gpasswd -a jenkins docker
  
  USER jenkins
  </code></pre>
  
  <hr>
  
  <p>build image is failing for command at line #38</p>
  
  <pre><code>RUN set -x \
      &amp;&amp; apt-get update \
      &amp;&amp; apt-get install -y \
          openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \
          ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \
      &amp;&amp; rm -rf /var/lib/apt/lists/* \
      &amp;&amp; [ "$JAVA_HOME" = "$(docker-java-home)" ]
  </code></pre>
  
  <hr>
  
  <p>with error: </p>
  
  <blockquote>
    <p>W: GPG error: <a href="https://apt.dockerproject.org" rel="noreferrer">https://apt.dockerproject.org</a> debian-jessie InRelease:
    The following signatures couldn't be verified because the public key
    is not available: NO_PUBKEY F76221572C52609D</p>
  
  <pre><code>W: There is no public key available for the following key IDs:
  AA8E81B4331F7F50
  W: Failed to fetch http://deb.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages
  </code></pre>
    
    <p>404  Not Found</p>
  
  <pre><code>E: Some index files failed to download. They have been ignored, or old ones used instead.
  
  ERROR: Service 'slavedotnet' failed to build: The command '/bin/sh -c set -x  &amp;&amp; apt-get update   &amp;&amp; apt-get install -y   openjdk-8-jdk="$JAVA_DEBIAN_VERSION"
    ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION"    &amp;&amp; rm -rf
  </code></pre>
    
    <p>/var/lib/apt/lists/*  &amp;&amp; [ "$JAVA_HOME" = "$(docker-java-home)" ]'
    returned a non-zero code: 100</p>
  </blockquote>
  
  <hr>
  
  <p>How public key error can get resolved?</p>