-
Notifications
You must be signed in to change notification settings - Fork 7k
[release] Add Azure CLI to base-extra image #58012
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,12 +16,15 @@ set -euo pipefail | |
| APT_PKGS=( | ||
| apt-transport-https | ||
| ca-certificates | ||
| curl | ||
| gnupg | ||
| htop | ||
| libaio1 | ||
| libgl1-mesa-glx | ||
| libglfw3 | ||
| libjemalloc-dev | ||
| libosmesa6-dev | ||
| lsb-release | ||
| patchelf | ||
| ) | ||
|
|
||
|
|
@@ -30,6 +33,23 @@ sudo apt-get install -y --no-install-recommends "${APT_PKGS[@]}" | |
| sudo apt-get autoclean | ||
| sudo rm -rf /etc/apt/sources.list.d/* | ||
|
Comment on lines
31
to
32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After installing the Azure CLI, it's a good practice to clean up the APT package lists to reduce the image size. This can be done by adding Also, consider combining the |
||
|
|
||
| mkdir -p /etc/apt/keyrings | ||
|
||
| curl -sLS https://packages.microsoft.com/keys/microsoft.asc | | ||
| gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null | ||
|
Comment on lines
+35
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's generally better to combine multiple commands into a single Consider combining the |
||
| chmod go+r /etc/apt/keyrings/microsoft.gpg | ||
|
||
|
|
||
| AZ_VER=2.72.0 | ||
| AZ_DIST="$(lsb_release -cs)" | ||
| echo "Types: deb | ||
| URIs: https://packages.microsoft.com/repos/azure-cli/ | ||
| Suites: ${AZ_DIST} | ||
| Components: main | ||
| Architectures: $(dpkg --print-architecture) | ||
| Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources | ||
|
|
||
| sudo apt-get update -y | ||
| sudo apt-get install -y azure-cli="${AZ_VER}"-1~"${AZ_DIST}" | ||
|
Comment on lines
+39
to
+49
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using Also, it would be better to combine all the commands related to setting up the Azure CLI repository and installing Azure CLI into a single |
||
|
|
||
| git clone --branch=4.2.0 --depth=1 https://github.com/wg/wrk.git /tmp/wrk | ||
| make -C /tmp/wrk -j | ||
| sudo cp /tmp/wrk/wrk /usr/local/bin/wrk | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gnupgandcurlare already inside the image. they do not need to be reinstalled here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed!