-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
{Packaging} Fix jp download url in ARM64 docker image #27269
Conversation
️✔️AzureCLI-FullTest
|
Hi @bebound, |
️✔️AzureCLI-BreakingChangeTest
|
Packaging |
Dockerfile
Outdated
@@ -61,6 +61,7 @@ RUN ./scripts/install_full.sh && python ./scripts/trim_sdk.py \ | |||
| xargs -r apk info --installed \ | |||
| sort -u \ | |||
)" \ | |||
&& echo rundeps $runDeps \ | |||
&& apk add --virtual .rundeps $runDeps |
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.
runDeps
is introduced by #5611
The $runDeps
is gdbm libbz2 libcrypto3 libexpat libffi libncursesw libnsl libpanelw libssl3 libtirpc libuuid musl readline sqlite-libs xz-libs zlib
, which is installed in python:3.10-alpine
. No new package is installed when installs azure-cli.
Virtual is usually used to quickly remove a set of packages, we don't used .rundeps
later. It looks like these lines are useless.
/ # apk list -I
.python-rundeps-20230826.011414 noarch {.python-rundeps} () [installed]
alpine-baselayout-3.4.3-r1 x86_64 {alpine-baselayout} (GPL-2.0-only) [installed]
alpine-baselayout-data-3.4.3-r1 x86_64 {alpine-baselayout} (GPL-2.0-only) [installed]
alpine-keys-2.4-r1 x86_64 {alpine-keys} (MIT) [installed]
apk-tools-2.14.0-r2 x86_64 {apk-tools} (GPL-2.0-only) [installed]
busybox-1.36.1-r2 x86_64 {busybox} (GPL-2.0-only) [installed]
busybox-binsh-1.36.1-r2 x86_64 {busybox} (GPL-2.0-only) [installed]
ca-certificates-20230506-r0 x86_64 {ca-certificates} (MPL-2.0 AND MIT) [installed]
ca-certificates-bundle-20230506-r0 x86_64 {ca-certificates} (MPL-2.0 AND MIT) [installed]
gdbm-1.23-r1 x86_64 {gdbm} (GPL-3.0-or-later) [installed]
keyutils-libs-1.6.3-r3 x86_64 {keyutils} (GPL-2.0-or-later AND LGPL-2.0-or-later) [installed]
krb5-conf-1.0-r2 x86_64 {krb5-conf} (MIT) [installed]
krb5-libs-1.20.1-r1 x86_64 {krb5} (MIT) [installed]
libbz2-1.0.8-r5 x86_64 {bzip2} (bzip2-1.0.6) [installed]
libc-utils-0.7.2-r5 x86_64 {libc-dev} (BSD-2-Clause AND BSD-3-Clause) [installed]
libcom_err-1.47.0-r2 x86_64 {e2fsprogs} (GPL-2.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause AND MIT) [installed]
libcrypto3-3.1.2-r0 x86_64 {openssl} (Apache-2.0) [installed]
libexpat-2.5.0-r1 x86_64 {expat} (MIT) [installed]
libffi-3.4.4-r2 x86_64 {libffi} (MIT) [installed]
libintl-0.21.1-r7 x86_64 {gettext} (LGPL-2.1-or-later) [installed]
libncursesw-6.4_p20230506-r0 x86_64 {ncurses} (X11) [installed]
libnsl-2.0.0-r0 x86_64 {libnsl} (LGPL-2.0-or-later) [installed]
libpanelw-6.4_p20230506-r0 x86_64 {ncurses} (X11) [installed]
libssl3-3.1.2-r0 x86_64 {openssl} (Apache-2.0) [installed]
libtirpc-1.3.3-r2 x86_64 {libtirpc} (BSD-3-Clause) [installed]
libtirpc-conf-1.3.3-r2 x86_64 {libtirpc} (BSD-3-Clause) [installed]
libuuid-2.38.1-r8 x86_64 {util-linux} (BSD-3-Clause) [installed]
libverto-0.3.2-r2 x86_64 {libverto} (MIT) [installed]
musl-1.2.4-r1 x86_64 {musl} (MIT) [installed]
musl-utils-1.2.4-r1 x86_64 {musl} (MIT AND BSD-2-Clause AND GPL-2.0-or-later) [installed]
ncurses-terminfo-base-6.4_p20230506-r0 x86_64 {ncurses} (X11) [installed]
readline-8.2.1-r1 x86_64 {readline} (GPL-2.0-or-later) [installed]
scanelf-1.3.7-r1 x86_64 {pax-utils} (GPL-2.0-only) [installed]
sqlite-libs-3.41.2-r2 x86_64 {sqlite} (blessing) [installed]
ssl_client-1.36.1-r2 x86_64 {busybox} (GPL-2.0-only) [installed]
tzdata-2023c-r1 x86_64 {tzdata} (Public-Domain) [installed]
xz-libs-5.4.3-r0 x86_64 {xz} (GPL-2.0-or-later AND Public-Domain AND LGPL-2.1-or-later) [installed]
zlib-1.2.13-r1 x86_64 {zlib} (Zlib) [installed]
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@@ -42,9 +42,9 @@ RUN apk add --no-cache bash openssh ca-certificates jq curl openssl perl git zip | |||
&& apk add --no-cache bash-completion \ | |||
&& update-ca-certificates | |||
|
|||
ARG JP_VERSION="0.1.3" | |||
ARG JP_VERSION="0.2.1" |
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.
There is no breaking change from 0.1.3 to 0.2.1
0.2.0 add jp-linux-arm64
release.
Ref: https://github.com/jmespath/jp/releases
|
||
RUN curl -L https://github.com/jmespath/jp/releases/download/${JP_VERSION}/jp-linux-amd64 -o /usr/local/bin/jp \ | ||
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && curl -L https://github.com/jmespath/jp/releases/download/${JP_VERSION}/jp-linux-$arch -o /usr/local/bin/jp \ |
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.
It's actually bad practice to include additional tools in the docker image. The image should be as small as possible.
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.
I have no idea why this image includes so many unrelated packages.
The image for Azure Linux is much smaller: #27204
|
||
RUN curl -L https://github.com/jmespath/jp/releases/download/${JP_VERSION}/jp-linux-amd64 -o /usr/local/bin/jp \ | ||
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && curl -L https://github.com/jmespath/jp/releases/download/${JP_VERSION}/jp-linux-$arch -o /usr/local/bin/jp \ |
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.
Using sed
to do the conversion is clever. I also saw this approach in https://stackoverflow.com/a/70369688/2199657.
Description
The url link in ARM64 should be updated.
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a
: Make some customer-facing breaking change[Component Name 2]
az command b
: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.