You can change the Dockerfile as below:
FROM mcr.microsoft.com/azure-cli:2.9.1
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/main' > /etc/apk/repositories
RUN apk update --allow-untrusted
RUN apk upgrade --allow-untrusted
RUN apk add postgresql17-client --allow-untrusted
it should works.