Docker-node: Change base image away from jessie. apt-get update not working. no security updates.

Created on 26 Mar 2019  路  8Comments  路  Source: nodejs/docker-node

apt-get update no longer works on node images based on jessie.
reason: jessie is archived and no updates made. see note

basically, the update link is missing now: http://cdn-fastly.deb.debian.org/debian/dists/ has no jessie-updates, causing the following error on apt-get update :

W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found

besides the inconvenience, it is a serious security threat to keep using jessie at this point.

please, upgrade the node dockerfiles away from jessie ASAP

Workaround:
force your base-image to use stretch (add the -stretch) in your Dockerfile:
FROM node:x.x.x-stretch

All 8 comments

Same problem here

stretch is the default base image unless you explicitly choose the jessie variant:

docker run -it --rm node:10 cat /etc/os-release | grep VERSION
VERSION_ID="9"
VERSION="9 (stretch)"
docker run -it --rm node:10-slim cat /etc/os-release | grep VERSION
VERSION_ID="9"
VERSION="9 (stretch)"
 docker run -it --rm node:10.15.3 cat /etc/os-release | grep VERSION
Unable to find image 'node:10.15.3' locally
10.15.3: Pulling from library/node
Digest: sha256:8dee5aba1bf0a2d5cf036f43d3daac165d6026bf75bff63236e5693023872a62
Status: Downloaded newer image for node:10.15.3
VERSION_ID="9"
VERSION="9 (stretch)"
docker run -it --rm node:10.15.3-slim cat /etc/os-release | grep VERSION
Unable to find image 'node:10.15.3-slim' locally
10.15.3-slim: Pulling from library/node
Digest: sha256:5a48598688f771a9140fdef31585dbe67b313b1e29439cbd9b81ebb25aeca517
Status: Downloaded newer image for node:10.15.3-slim
VERSION_ID="9"
VERSION="9 (stretch)"

@chorrell Not if you're using node:8.10.0:

$ docker run -it --rm node:8.10.0 cat /etc/os-release | grep VERSION
VERSION_ID="8"
VERSION="8 (jessie)"

Yes, it's an older version. We can't go back in time.

For actively supported versions based on Jessie, this will be updated via https://github.com/debuerreotype/docker-debian-artifacts/issues/66#issuecomment-476648047.

Same issue on 10.8.0. Specifying node:10.8.0-stretch didn't solve this either. We aren't even using jessie.
Any ideas?

@AdalynRockwood node:10.8 also uses jessie:

docker run --rm -it node:10.8 apt-get update
Unable to find image 'node:10.8' locally
10.8: Pulling from library/node
d660b1f15b9b: Already exists
46dde23c37b3: Already exists
6ebaeb074589: Already exists
e7428f935583: Already exists
eda527043444: Already exists
f3088daa8887: Already exists
78a03a082983: Pull complete
78741e770135: Pull complete
Digest: sha256:8062236dc2ee065a98af95eec74d5928d065194eb0ab8fffabdbc5cfaac2137a
Status: Downloaded newer image for node:10.8
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Ign http://deb.debian.org jessie-updates InRelease
Get:2 http://deb.debian.org jessie Release.gpg [2420 B]
Ign http://deb.debian.org jessie-updates Release.gpg
Get:3 http://deb.debian.org jessie Release [148 kB]
Get:4 http://security.debian.org jessie/updates/main amd64 Packages [824 kB]
Ign http://deb.debian.org jessie-updates Release
Get:5 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages
  404  Not Found
Fetched 10.1 MB in 14s (697 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found

adding the -stretch seems to solve it:

docker run --rm -it node:10.8.0-stretch apt-get update
Unable to find image 'node:10.8.0-stretch' locally
10.8.0-stretch: Pulling from library/node
Digest: sha256:abe2fb23cd29ad1b199f18102a02159cbd07068a7fea5db174019b4f7b93f1ae
Status: Downloaded newer image for node:10.8.0-stretch
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 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [481 kB]
Get:5 http://deb.debian.org/debian stretch Release [118 kB]
Get:6 http://deb.debian.org/debian stretch-updates/main amd64 Packages [11.1 kB]
Get:7 http://deb.debian.org/debian stretch Release.gpg [2434 B]
Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7084 kB]
Fetched 7881 kB in 1min 2s (126 kB/s)
Reading package lists... Done

Thanks for your response, rjanovski! I ended up upgrading to node:11.0.0-stretch. :/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marciomsm picture marciomsm  路  4Comments

mtibben picture mtibben  路  3Comments

NodeGuy picture NodeGuy  路  4Comments

polys picture polys  路  3Comments

linux17kartik picture linux17kartik  路  4Comments