I am publishing my python application with this command:
func azure functionapp publish myapp --build-native-deps --additional-packages cmake opencv-python-headless

it pulls the microsoft docker image, and then spins up a container and throws this error :

N: Repository 'http://deb.debian.org/debian bullseye InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

N: Repository 'http://security.debian.org/debian-security stable-security InRelease' changed its 'Version' value from '11' to '12'

E: Repository 'http://security.debian.org/debian-security stable-security InRelease' changed its 'Codename' value from 'bullseye-security' to 'bookworm-security'

N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

N: Repository 'http://deb.debian.org/debian-security bullseye-security InRelease' changed its 'Suite' value from 'stable-security' to 'oldstable-security'

N: Repository 'http://deb.debian.org/debian bullseye-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'

I have tried to clearing out space to make more memory available
i also tried using the bash container to access that image, it gets fixed but when i try to publish my app
it spins up a totally different container and i get the same error

I don't have much experience doing this, any help would be appreciated

1

There are 1 best solutions below

2
On BEST ANSWER

The repository 'http://deb.debian.org/debian' has changed its 'Suite' value from 'stable' to 'oldstable'. This can happen when the Debian distribution undergoes a new release, and the repositories are updated accordingly.

  • Instead of relying on the default Microsoft Docker image, I have created a Dockerfile in my python application root folder.

Dockerfile :

FROM python:3.8-slim-buster

# Install additional dependencies
RUN apt-get update && apt-get install -y --no-install-recommends cmake

# Set the working directory
WORKDIR /app

# Copy the application code to the container
COPY . /app

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Set the entry point for the function app
CMD ["main"]
  • To build the Docker image I used the below command:
docker build -t myapp .
  • I am able to create Docker Image. enter image description here

  • Publish the app to Azure function by the below command line.

func azure functionapp publish myapp --docker-container myapp
  • Here I can see the Docker image converting into Container.

enter image description here