Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End of support for debian stretch - Failed to fetch stretch* 404 Not Found - Need to rebuild old images to use debian strech in archive repo #337

Open
maxime-morel opened this issue May 19, 2023 · 0 comments

Comments

@maxime-morel
Copy link

We have the following error when using PrestaShop images using bebian strech, after running apt update:

#0 7.742 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.66.132 80]
#0 7.742 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
#0 7.742 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
#0 7.742 E: Some index files failed to download. They have been ignored, or old ones used instead.

The issue is related to debian repos that removed the stretch support (which is still accessible in the archive repos).

To fix this issue, you may try rebuilding the PrestaShop Docker images should automatically update the repo to archive (as the base image is from PHP FROM php:7.1-apache, it should automatically be using the archive repo in the source list)

I was able to reproduce the issue with PS 1.5 / 1.6 / 1.7.5.5

As a workaround, we are detecting the debian version and changing the repo list:

ARG VERSION_PRESTA
FROM prestashop/prestashop:$VERSION_PRESTA

# Update apt source list (for debian stretch on old PS images using debian 9)
RUN if [ $(awk -F. '{print $1}' /etc/debian_version) -eq 9 ]; then \
  printf 'deb http://archive.debian.org/debian/ stretch main contrib non-free deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free deb http://archive.debian.org/debian/ stretch-backports main contrib non-free' > /etc/apt/sources.list; \
  fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant