-
Notifications
You must be signed in to change notification settings - Fork 3k
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: command not found when using docker image >= 2.54.0 in an ARM deploymentScript w/ supportingScriptUris #29000
Comments
Thank you for opening this issue, we will look into it. |
Why does |
I don't know. To be clear: this is not a script we wrote. This script was created by Microsoft and is automatically injected and ran during the ARM deployment. As far as I can tell, there is no way for us to change this behaviour. |
Any updates on this? |
@zhoxing-ms for help |
@jorgecotillo Could you please help explain does |
Appreciate you looking into this - is there any update on this issue currently? |
@zhoxing-ms it is used to fetch user scripts to be executed inside the container. Please see https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-script-template if you'd like more information about the product. If you would like more specifics (e.g. a link to the script itself), please reach out to me internally - my alias is antmarti. We've been able to work around this by switching from |
@anthony-c-martin PS: These packages are provided by the base OS of our image, but it may change in the future. For example, |
It might make sense to provide those by default though. They are both small packages and are heavily utilized, outweighing the disadvantages if we had to manually provide them |
+1
Thanks for clarifying; sounds like we may need to move to publishing our own container image - installing at runtime is going to be too slow and unreliable for use in deploymentScripts. |
We adhere to Docker best practices: If the official image doesn't meet your needs, you should build your own image on top of it. PS: I'm not saying we won't add more Linux tools in the image, but creating an all-encompassing development environment is not the goal of CLI image. |
This is a DX question, not a best practices question.
In the question above, currently it's the "struggle" part. We are with 3 devs here already saying the same "It's a HELL" with no guidance. Creating own containers creates and brings a hassle that organizations do not want to deal with. Especially for something such as |
@bebound bear in mind that this container image is used directly for https://github.com/marketplace/actions/azure-cli-action. The Docker guidance on "publish your own container image" does not really apply for this use case, because it's not trivial to swap out images - your users would have to completely replace their usage of this action.
I think you're taking this guidance to the extreme. |
Describe the bug
When using
"kind": "AzureCLI"
inside of aMicrosoft.Resources/deploymentScripts
inside an ARM deployment, the script fails when one or moresupportingScriptUris
are set.This happens because when
supportingScriptUris
is set, the entrypoint script (/mnt/azscripts/azscriptinput/DeploymentScript.sh
, provided by the deployment) attempts to retrieve these additional resources using cURL.cURL was removed in 2.54.0, in this commit, to remove build dependencies from the docker image.
As there seems to be no way to change the default entrypoint script in a
Microsoft.Resources/deploymentScripts
, this is now broken for any AZ CLI version >= 2.54.0Related command
docker run -it mcr.microsoft.com/azure-cli:2.61.0 /bin/bash -c 'curl'
Errors
Issue script & Debug output
Sample
Microsoft.Resources/deploymentScripts
definition:Expected behavior
Using
supportingScriptUris
inside of aMicrosoft.Resources/deploymentScripts
ARM resource pulls the external artifacts.Environment Summary
docker image
mcr.microsoft.com/azure-cli
with tags >= 2.54.0Additional context
The only workaround I've found is to fall back to 2.53.0.
The text was updated successfully, but these errors were encountered: