security.debian.org «не имеет файла Release» с образами Debian Docker

security.debian.org «не имеет файла Release» с образами Debian Docker

Похоже, что оба debian:stable-slimварианта debian:stableв настоящее время не работают (для обновлений):

> $ docker run -ti --rm  debian:stable-slim
Unable to find image 'debian:stable-slim' locally
stable-slim: Pulling from library/debian
fc491617b0f1: Pull complete
Digest: sha256:a85c2c0e634946e92a6f4a9a4f6ce5f19ce7c11885bc198f04ab3ae8dacbaffa
Status: Downloaded newer image for debian:stable-slim
root@e610973ac2f8:/# apt update
Ign:1 http://security.debian.org/debian-security stable/updates InRelease
Err:2 http://security.debian.org/debian-security stable/updates Release
  404  Not Found [IP: 151.101.130.132 80]
Get:3 http://deb.debian.org/debian stable InRelease [113 kB]
Get:4 http://deb.debian.org/debian stable-updates InRelease [36.8 kB]
Get:5 http://deb.debian.org/debian stable/main amd64 Packages [8178 kB]
Reading package lists... Done
E: The repository 'http://security.debian.org/debian-security stable/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Кто-нибудь еще сталкивался с этим или нашел решение?

решение1

Мне удалось исправить это, изменив эту строку:

deb http://security.debian.org/debian-security stable/updates main

к

deb http://security.debian.org/debian-security stable-security/updates main

Это можно сделать, выполнив:

sed -i 's/stable\/updates/stable-security\/updates/' /etc/apt/sources.list

решение2

Проблема

Столкнулся с этой проблемой на образе Debian Stretch (9) Docker.

При запуске apt-get update возникла следующая ошибка

W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found [IP: xx]
E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

Фон

Это касается, в частности, репозитория ценных бумаг.

Эти определения репозитория используются apt для получения обновлений и определены в/etc/apt/sources.list

Официальная рекомендация по безопасности Debian -https://www.debian.org/security/

To keep your Debian operating system up-to-date with security patches, please add the following line to your /etc/apt/sources.list file

`deb http://security.debian.org/debian-security bullseye-security main contrib non-free`

Отвечать

Добавьте эту строку в Dockerfile

RUN echo "deb http://security.debian.org/debian-security bullseye-security main contrib non-free" > /etc/apt/sources.list

RUN apt-get update

Другие решения

Что мне не подошло:

  • Изменение репозитория на stable-security
  • Запуск apt с --allow-releaseinfo-changeфлагом — флаг, связанный с apt-get update, не распознан

Что еще сработало:

  • Вместо использования репозитория безопасности Bullseye вы можете использовать репозиторий архива Stretch deb http://archive.debian.org/debian stretch main contrib non-free; с точки зрения безопасности было бы лучше придерживаться безопасности из последнего релиза.

Обновлять

Вышеизложенное верно, если вы просто рассматриваете проблему репо безопасности.

Почему у нас возникли проблемы с репозиторием безопасности?

В моем случае Debian 9 — это архивная, неподдерживаемая и несопровождаемая версия.

Хотя я мог "исправить" (обойти) репозиторий безопасности, у меня возникли дополнительные проблемы с репозиториями зависимостей для APT. Поскольку версия устарела, эти репозитории должны были указывать на архив.

В общем, это заставило меня обновиться до Debian 10. На Debian 10 мне не требовалось вышеуказанное исправление.

решение3

Из debian.org... (замените "stretch" на вашу текущую версию). Сотрите другие строки, которые выглядят похожими, затем выполните apt-get update и apt-get upgrade.

deb http://archive.debian.org/debian/ stretch main non-free contrib
deb-src http://archive.debian.org/debian/ stretch main non-free contrib

deb http://archive.debian.org/debian-security/ stretch/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ stretch/updates main non-free contrib

Связанный контент