Unable to locate package azure-cli
Reference to Issue #15506
azure-cli is not working for me
EXECUTING THE command
RUN apt-get -y update && apt-get install azure-cli
Getting below error
0.887 Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
#9 0.982 Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
#9 1.333 Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
#9 1.685 Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
#9 1.772 Reading package lists...
#9 2.546 Reading package lists...
#9 3.284 Building dependency tree...
#9 3.460 Reading state information...
#9 3.472 E: Unable to locate package azure-cli
@jiasli for awareness
Please check the guide here: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt
@bebound is right.
Unable to locate package azure-cli
This error means you haven't added Microsoft Linux Repo https://packages.microsoft.com/repos/azure-cli/
Thank you for your feedback. This has been routed to the support team for assistance.
@jiasli Find below the docker image snippet
FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update && apt-get install -y tcl
RUN apt-get -y install git
RUN apt-get -y install zip
RUN apt-get -y install curl
RUN apt-get install -y python-pip
RUN apt-get -y update && apt-get install azure-cli
create a docker file with name Dockerfile
and save the above content in file
execute it, with the below command
>docker build -t image1 .
@bebound is right.
Unable to locate package azure-cli
This error means you haven't added Microsoft Linux Repo https://packages.microsoft.com/repos/azure-cli/
I have added the package as mentioned in the link but there is no specific set of commands which can be used to execute inside the docker image.
You need to execute each command in the docker.
Replace apt-get install azure-cli with apt-get install curl && curl -sL https://aka.ms/InstallAzureCLIDeb | bash in your dockerfile.
PS: This may help: https://www.cloudbees.com/blog/a-beginners-guide-to-the-dockerfile