Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curl appears to be missing from mcr.microsoft.com/azure-cli:latest #28581

Closed
lcividinwork opened this issue Mar 19, 2024 · 6 comments
Closed
Assignees
Labels
Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. Possible-Solution question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Similar-Issue
Milestone

Comments

@lcividinwork
Copy link

Describe the bug

Curl appears to be missing in mcr.microsoft.com/azure-cli:latest alpine I can see it's still in the dockerfile here https://github.com/Azure/azure-cli/blob/dev/alpine.dockerfile#L38
I can install it with apk add

docker run -it mcr.microsoft.com/azure-cli sh
/ # curl
sh: curl: not found

Related command

docker run -it mcr.microsoft.com/azure-cli sh
/ # curl
sh: curl: not found

/ # ls -lah /usr/bin | grep curl #nothing found
/ # ls -lah /usr/local/bin | grep curl #nothing found

curl --version
sh: curl: not found

apk add curl
/ # apk add curl
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
(1/7) Installing brotli-libs (1.1.0-r1)
(2/7) Installing c-ares (1.24.0-r1)
(3/7) Installing libunistring (1.1-r2)
(4/7) Installing libidn2 (2.3.4-r4)
(5/7) Installing nghttp2-libs (1.58.0-r0)
(6/7) Installing libcurl (8.5.0-r0)
(7/7) Installing curl (8.5.0-r0)
Executing busybox-1.36.1-r15.trigger
OK: 35 MiB in 57 packages
/ # which curl
/usr/bin/curl
/ #

/ # curl --version
curl 8.5.0 (x86_64-alpine-linux-musl) libcurl/8.5.0 OpenSSL/3.1.4 zlib/1.3.1 brotli/1.1.0 c-ares/1.24.0 libidn2/2.3.4 nghttp2/1.58.0
Release-Date: 2023-12-06
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTPS-proxy IDN IPv6 Largefile libz NTLM SSL threadsafe TLS-SRP UnixSockets
/ #

Errors

Curl is missing from the image. I can see it's meant to be added in the dockerfile in this repo though

sh: curl: not found

Issue script & Debug output

no debug required package is missing possible image build issue d

Expected behavior

Curl should be present in the latest image

Environment Summary

/ # az --version
azure-cli 2.58.0

core 2.58.0
telemetry 1.1.0

Dependencies:
msal 1.26.0
azure-mgmt-resource 23.1.0b2

Python location '/usr/local/bin/python'
Extensions directory '/root/.azure/cliextensions'

Python (Linux) 3.11.8 (main, Feb 7 2024, 23:20:20) [GCC 13.2.1 20231014]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

is docker image related not azcli command related.

@lcividinwork lcividinwork added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 19, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Mar 19, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 19, 2024

Thank you for opening this issue, we will look into it.

Copy link

Hi @lcividinwork
Find similar issue #5060.

Issue title curl not working in the azure-cli-python Docker image
Create time 2017-12-07
Comment number 4

Possible solution:
According to the previous issue, curl was not working in the azure-cli-python Docker image. The solution was to install curl on the base image (python alpine) which worked fine. In the previous issue, it was also mentioned that the issue was fixed in azuresdk/azure-cli-python:latest which was pushed a few hours ago. When the next release is made, that image will be tagged with version 2.0.23. Therefore, you can try pulling the latest image and installing curl with the command apk add curl --no-cache.


Please confirm if this resolves your issue.

@lcividinwork
Copy link
Author

lcividinwork commented Mar 19, 2024

no that is not a solution but a work around, which has been implemented to work around it but I believe it still should be in the image build. https://github.com/Azure/azure-cli/blob/release/alpine.dockerfile#L38

@yonzhan yonzhan added this to the Backlog milestone Mar 19, 2024
@yonzhan yonzhan added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that and removed bug This issue requires a change to an existing behavior in the product in order to be resolved. labels Mar 19, 2024
@bebound
Copy link
Contributor

bebound commented Mar 20, 2024

We remove it intentionally. See https://github.com/Azure/azure-cli/pull/27567

@bebound bebound closed this as completed Mar 20, 2024
@lcividinwork
Copy link
Author

Ok thanks for the explanation, we've been using the latest tag azurecli image for a long time, our deployment plans only now have started failing with the missing curl package this week.
If it's been removed from since 2023, I wonder why our plans have only started failing now?
I added a step to install the package, just don't get why the image only started failing this week.

@pinkfloydx33
Copy link

You realize that by removing you have broken Azure ARM deploymentScripts which uses the azure-cli image and from within launches curl to download supporting scripts. This no longer works. I just tried updating to the latest version "supported" by Azure but apparently that's wrong and I need to downgrade a few versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. Possible-Solution question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Similar-Issue
Projects
None yet
Development

No branches or pull requests

4 participants