0

Am trying to create a automated build system with epheremal jenkins slaves as generic build containers


Amidst creation of an image from below Dockerfile:

FROM openjdk:8-jdk 


# This is FROM openjdk:8-jdk  
RUN apt-get update && apt-get install -y --no-install-recommends \
        bzip2 \
        unzip \
        xz-utils \
                apt-transport-https \
    && rm -rf /var/lib/apt/lists/*

RUN echo 'deb http://deb.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/jessie-backports.list
RUN echo 'deb https://apt.dockerproject.org/repo debian-jessie main' > /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)")")"'; \
    } > /usr/local/bin/docker-java-home \
    && 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 \
    && apt-get update \
    && apt-get install -y \
        openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \
        ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \
    && rm -rf /var/lib/apt/lists/* \
    && [ "$JAVA_HOME" = "$(docker-java-home)" ]

After running Step12:

Step 12/24 : RUN set -x     && apt-get update   && apt-get install -y       openjdk-8-jdk="$JAVA_DEBIAN_VERSION"        ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION"    && rm -rf /var/lib/apt/lists/*  && [ "$JAVA_HOME" = "$(docker-java-home)" ]
 ---> Running in 7d550dcf01b1
+ apt-get update

I get below error:

Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:3 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Ign:4 http://deb.debian.org/debian jessie-backports InRelease
Get:5 http://deb.debian.org/debian stretch Release [118 kB]
Get:6 https://apt.dockerproject.org/repo debian-jessie InRelease [48.7 kB]
Get:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [495 kB]
Ign:8 http://deb.debian.org/debian jessie-backports Release
Ign:6 https://apt.dockerproject.org/repo debian-jessie InRelease
Get:9 http://deb.debian.org/debian stretch Release.gpg [2434 B]
Get:10 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.2 kB]
Get:11 https://apt.dockerproject.org/repo debian-jessie/main amd64 Packages [6892 B]
Ign:12 http://deb.debian.org/debian jessie-backports/main amd64 Packages
Ign:13 http://deb.debian.org/debian jessie-backports/main all Packages
Get:14 http://deb.debian.org/debian stretch/main amd64 Packages [7082 kB]
Ign:12 http://deb.debian.org/debian jessie-backports/main amd64 Packages
Ign:13 http://deb.debian.org/debian jessie-backports/main all Packages
Ign:12 http://deb.debian.org/debian jessie-backports/main amd64 Packages
Ign:13 http://deb.debian.org/debian jessie-backports/main all Packages
Ign:12 http://deb.debian.org/debian jessie-backports/main amd64 Packages
Ign:13 http://deb.debian.org/debian jessie-backports/main all Packages
Ign:12 http://deb.debian.org/debian jessie-backports/main amd64 Packages
Ign:13 http://deb.debian.org/debian jessie-backports/main all Packages
Err:12 http://deb.debian.org/debian jessie-backports/main amd64 Packages
  404  Not Found
Ign:13 http://deb.debian.org/debian jessie-backports/main all Packages
Fetched 7966 kB in 12s (646 kB/s)
Reading package lists...
W: The repository 'http://deb.debian.org/debian jessie-backports Release' does not have a Release file.
W: GPG error: https://apt.dockerproject.org/repo debian-jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F76221572C52609D
W: The repository 'https://apt.dockerproject.org/repo debian-jessie InRelease' is not signed.
E: Failed to fetch http://deb.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c set -x  && apt-get update   && apt-get install -y       openjdk-8-jdk="$JAVA_DEBIAN_VERSION"        ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION"    && rm -rf /var/lib/apt/lists/*  && [ "$JAVA_HOME" = "$(docker-java-home)" ]' returned a non-zero code: 100

Edit:

After following these steps, I get below error:

Step 12/25 : RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D         && apt-get update
 ---> Running in 0c0e8d6cbf63
Warning: apt-key output should not be parsed (stdout is not a terminal)
Executing: /tmp/apt-key-gpghome.0acbIyFC9r/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D
gpg: key F76221572C52609D: 7 signatures not checked due to missing keys
gpg: key F76221572C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://deb.debian.org/debian stretch InRelease
Get:3 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 https://apt.dockerproject.org/repo debian-jessie InRelease [48.7 kB]
Get:5 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [499 kB]
Ign:6 http://deb.debian.org/debian jessie-backports InRelease
Get:7 https://apt.dockerproject.org/repo debian-jessie/main amd64 Packages [6892 B]
Get:8 http://deb.debian.org/debian stretch Release [118 kB]
Ign:9 http://deb.debian.org/debian jessie-backports Release
Get:10 http://deb.debian.org/debian stretch Release.gpg [2434 B]
Get:11 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.2 kB]
Ign:12 http://deb.debian.org/debian jessie-backports/main all Packages
Ign:13 http://deb.debian.org/debian jessie-backports/main amd64 Packages
Get:14 http://deb.debian.org/debian stretch/main amd64 Packages [7082 kB]
Ign:12 http://deb.debian.org/debian jessie-backports/main all Packages
Ign:13 http://deb.debian.org/debian jessie-backports/main amd64 Packages
Ign:12 http://deb.debian.org/debian jessie-backports/main all Packages
Ign:13 http://deb.debian.org/debian jessie-backports/main amd64 Packages
Ign:12 http://deb.debian.org/debian jessie-backports/main all Packages
Ign:13 http://deb.debian.org/debian jessie-backports/main amd64 Packages
Ign:12 http://deb.debian.org/debian jessie-backports/main all Packages
Ign:13 http://deb.debian.org/debian jessie-backports/main amd64 Packages
Ign:12 http://deb.debian.org/debian jessie-backports/main all Packages
Err:13 http://deb.debian.org/debian jessie-backports/main amd64 Packages
  404  Not Found
Fetched 7970 kB in 6s (1297 kB/s)
Reading package lists...
W: The repository 'http://deb.debian.org/debian jessie-backports Release' does not have a Release file.
E: Failed to fetch http://deb.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages  404  Not Found
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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D         && apt-get update' returned a non-zero code: 100

0 Answers0