2

Below command:

RUN apt-get update -y && \
    apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y && \
    easy_install pip

is giving error:

Step 9/14 : RUN apt-get update -y &&     apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y &&     easy_install pip
 ---> Running in 25a6ae724b15
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://httpredir.debian.org jessie InRelease
Get:2 http://httpredir.debian.org jessie-updates InRelease [16.3 kB]
Ign http://httpredir.debian.org jessie-backports InRelease
Get:3 http://httpredir.debian.org jessie Release.gpg [1652 B]
Ign http://httpredir.debian.org jessie-backports Release.gpg
Get:4 http://httpredir.debian.org jessie Release [77.3 kB]
Ign http://httpredir.debian.org jessie-backports Release
Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Err http://httpredir.debian.org jessie-backports/main amd64 Packages
  404  Not Found
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [901 kB]
Get:6 http://httpredir.debian.org jessie-updates/main amd64 Packages [20 B]
Get:7 http://httpredir.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 10.1 MB in 17s (573 kB/s)
W: There is no public key available for the following key IDs:
AA8E81B4331F7F50
W: Failed to fetch http://httpredir.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 'jenkins' failed to build: The command '/bin/sh -c apt-get update -y &&     apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y &&     easy_install pip' returned a non-zero code: 100

To try resolving this error, below are the changes done:

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 && \
    apt-get update -y && \
    apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y && \
    easy_install pip

Problem still remains with below error:

Step 9/14 : RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 &&     apt-get update -y &&     apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y &&     easy_install pip
 ---> Running in d51497786a78
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.XQtj1WUFSF --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50
gpg: requesting key 331F7F50 from hkp server keyserver.ubuntu.com
gpg: key 8AE22BA9: public key "Debian Security Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
Ign http://httpredir.debian.org jessie InRelease
Get:1 http://httpredir.debian.org jessie-updates InRelease [16.3 kB]
Get:2 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://httpredir.debian.org jessie-backports InRelease
Get:3 http://httpredir.debian.org jessie Release.gpg [1652 B]
Ign http://httpredir.debian.org jessie-backports Release.gpg
Get:4 http://httpredir.debian.org jessie Release [77.3 kB]
Ign http://httpredir.debian.org jessie-backports Release
Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Get:5 http://httpredir.debian.org jessie-updates/main amd64 Packages [20 B]
Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Get:6 http://httpredir.debian.org jessie/main amd64 Packages [9098 kB]
Get:7 http://security.debian.org jessie/updates/main amd64 Packages [901 kB]
Err http://httpredir.debian.org jessie-backports/main amd64 Packages
  404  Not Found
W: Failed to fetch http://httpredir.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.
Fetched 10.1 MB in 17s (587 kB/s)
ERROR: Service 'jenkins' failed to build: The command '/bin/sh -c apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 &&     apt-get update -y &&     apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y &&     easy_install pip' returned a non-zero code: 100

1) What is the meaning of this error?

2) How to resolve this error?

1
5

AA8E81B4331F7F50 is the Stretch (release after Jessie) signing key. You could fix that by installing a newer debian-archive-keyring package, but I doubt you actually need to.

However, your bigger issue is that you're using jessie-backports. That was EOL'd along with Jessie (backports does not get long-term support). If you want to use the old, unsupported jessie-backports packages, you need to grab them from http://archive.debian.org/debian/dists/jessie-backports/ instead. Also, archived material is not re-signed, so the signature is expired. Per Failed to Fetch Jessie Backports Repository, the sources.list entry would look like:

deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main

Also, httpredir.debian.org is no more; you probably want deb.debian.org instead. See https://deb.debian.org/ for instructions.

(What you really ought to do, of course, is build your container on the current release, Buster.)

6
  • The configuration needed for Jessie is detailed here, validity checks need to be disabled entirely. But really, container images based on Jessie should be avoided at this point. – Stephen Kitt Nov 6 '19 at 22:10
  • Do I need to update sources.lst? Am not getting this answer – overexchange Nov 6 '19 at 23:09
  • what is debian-archive-keyring? – overexchange Nov 7 '19 at 0:52
  • @overexchange I've clarified some, does that help? You need to edit sources.list. And debian-archive-keyring is a package name. – derobert Nov 7 '19 at 16:14
  • Why is this question offtopic? askubuntu moderator suggested me to post here – overexchange Nov 7 '19 at 16:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.