2

I am trying to build a docker image by:

docker-compose up —build 

But I get the error:

=> ERROR [runtime-image 3/6] RUN apt-get update -y 1.0s ------ > [runtime-image 3/6] RUN apt-get update -y: ……….(successfully updating until here)……. #0 0.591 Ign:10 http://deb.debian.org/debian stretch/main all Packages #0 0.591 Err:8 http://security.debian.org/debian-security stretch/updates/main arm64 Packages #0 0.591 404 Not Found #0 0.612 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages #0 0.632 Ign:12 http://deb.debian.org/debian stretch-updates/main arm64 Packages #0 0.662 Ign:9 http://deb.debian.org/debian stretch/main arm64 Packages #0 0.685 Ign:10 http://deb.debian.org/debian stretch/main all Packages #0 0.707 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages #0 0.732 Ign:12 http://deb.debian.org/debian stretch-updates/main arm64 Packages #0 0.755 Ign:9 http://deb.debian.org/debian stretch/main arm64 Packages #0 0.777 Ign:10 http://deb.debian.org/debian stretch/main all Packages #0 0.810 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages #0 0.832 Ign:12 http://deb.debian.org/debian stretch-updates/main arm64 Packages #0 0.854 Err:9 http://deb.debian.org/debian stretch/main arm64 Packages #0 0.854 404 Not Found #0 0.923 Ign:10 http://deb.debian.org/debian stretch/main all Packages #0 0.945 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages #0 0.965 Err:12 http://deb.debian.org/debian stretch-updates/main arm64 Packages #0 0.965 404 Not Found #0 0.975 Reading package lists... #0 0.990 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file. #0 0.990 W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file. #0 0.990 W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file. #0 0.990 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-arm64/Packages 404 Not Found #0 0.990 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-arm64/Packages 404 Not Found #0 0.990 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-arm64/Packages 404 Not Found #0 0.990 E: Some index files failed to download. They have been ignored, or old ones used instead. ------ failed to solve: executor failed running [/bin/sh -c apt-get update -y]: exit code: 100 

The docker file part that looks to be causing the error is:

….. (successfully building until here) …….. RUN apt-get update -y RUN apt-get install -y --no-install-recommends default-libmysqlclient-dev curl apt-utils ffmpeg mysql-server 

I have tried various recommended solutions online but nothing works. I tried downgrading the Docker version but it didn’t work.

I am working on a Mac and the Docker version is 20.10.24, build 297e128 and Docker Compose version v2.17.2.

Any suggestion could be very appreciated.

2 Answers 2

1

Your image is outdated and attempts to use a repository that is no longer there for the update, you can either change your build step to update your repo reference first before calling update or update your base image to one that already had such update. See https://unix.stackexchange.com/questions/743839/apt-get-update-failed-to-fetch-debian-amd64-packages-while-building-dockerfile-f

Sign up to request clarification or add additional context in comments.

1 Comment

If you are doing the process over Docker (in my case a php-apache-5.6 dockerfile) please review the response the second most voted answer provided by Ben Kaplan
0

If you explicitly use debian:stretch as a base image then I would suggest to simply upgrade it to debian:bullseye.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.