
In a non-docker environment, this check is intended to protect the user from suddenly and unexpectedly installing packages from a different Debian release. Certain fields don't match between the two versions.Docker base images should generally clean this cache. APT has a cached version of the Release file - This is the bug.This changes the behavior of apt -y ( APT::Get::Assume-Yes). The reason why this behavior differs between docker build and docker run -it is the use of the -t flag to allocate a tty. The permanent fix is to clear out /var/lib/apt/lists in the base image Dockerfile, but it can be temporarily worked around by rebuilding the base image or using the -allow-releaseinfo-change option. The root issue is a bug in the base image you're using. Note: Question moved from SO since it's apparently off-topic there. even if the command fails, I can install package from testing, e.g., apt update -y || apt install g++ will install g++-10 instead of the default g++-8 on Buster.Īny idea why the command fails? And how I can fix it?Įdit: Adding -allow-releaseinfo-change to apt update -y in the dockerfile fixed the issue, but I'd still like to know why it failed without?.if I change the base image to debian:buster-slim on which the image is based, the docker build works fine,.if I run the exact same two commands after launching docker run -rm -it -entrypoint bash /azure-functions/python:3.0-python3.9, apt update -y works fine,.The command '/bin/sh -c apt update -y' returned a non-zero code: 100

Get:8 testing/main amd64 Packages Į: Repository ' buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'Į: Repository ' buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'Į: Repository ' buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates' This fails in the apt update -y step with the following error WARNING: apt does not have a stable CLI interface. RUN echo 'deb testing main' > /etc/apt//testing.list I'm trying to install an apt source on the Microsoft azure function docker, here is my Dockerfile FROM /azure-functions/python:3.0-python3.9
